Utm params not getting tracked in the Shopify dashboard

srinivascr1999
Visitor
2 0 0

We are using checkoutCreate api to get the checkout url, and manually appending UTM params when clicks happen that should track in the Shopify dashboard but the link is getting changed and not reflecting the count in the shopify once we redirected.
Below is the URL we are currently 
https://thedivashop.ng/27201732651/checkouts/e27174ef08bd73af82ab9fdf38927aa1?key=ffdfeb33f28050ba01...


API URL we are using https://the-diva-shop-nigeria.myshopify.com/api/2023-07/graphql.json
and the body 

 

 

 

{
    "query": "mutation CheckoutCreate($input: CheckoutCreateInput!) { checkoutCreate(input: $input) { checkout { id orderStatusUrl requiresShipping totalPrice { amount currencyCode } subtotalPrice { amount currencyCode } webUrl customAttributes {key value}  } } }",
    "variables": {
        "input": {
            "lineItems": [
                {
                    "quantity": 1,
                    "variantId": "gid://shopify/ProductVariant/40187816345643"
                }
            ],
            "customAttributes": [
                {
                    "key": "utm_source",
                    "value": "WhatsappSales"
                },
                {
                    "key": "utm_medium",
                    "value": "whatsapp-sales"
                },
                {
                    "key": "utm_campaign",
                    "value": "WhatsappSales"
                }
            ]
        }
    }
}

 

 

 

also  we tried to add customattributes as well it didn't work please help

 

Replies 3 (3)
SBD_
Shopify Staff
Shopify Staff
1602 227 334

Hey @srinivascr1999 

 

Are you doing a fresh CheckoutCreate each time the values change?

 

Can you elaborate on "not reflecting the count in the shopify once we redirected."?

 

I just ran a test using CheckoutCreate with customAttributes and these attributes were visible in the admin once the order completed.

 

Moving forward, consider using cartCreate / cartAttributesUpdate mutations.

Scott | Developer Advocate @ Shopify 

srinivascr1999
Visitor
2 0 0

Yes, we are creating fresh CheckoutCreate each time, 
Actually, once we receive the checkout URL from checkourcreate API we are appending UTM params for the tracking purpose.  but when we click on the link, the format is changed and not reflected and tracked in the Shopify dashboard.

Screenshot 2023-09-06 at 10.24.31 AM.png

Screenshot 2023-09-06 at 10.25.33 AM.png

Above Is the client's Shopify Dashboard, WA sales count should be tracked


Below is the WA checkout link for the reference.

Screenshot 2023-09-06 at 10.28.08 AM.png

 Then if us the attribute / cartAttributesUPdate will it appends to the same URL??
Will sharing you sample response which we are getting now

We appending utms to webURL

{"data":{"checkoutCreate":{"checkout":{"id":"gid://shopify/Checkout/b094a4894876e7caa2dad1ffa00b93f9?key=113ef04c5f10e340bd7fc02e262d64d2","orderStatusUrl":null,"requiresShipping":true,"totalPrice":{"amount":"1333.0","currencyCode":"NGN"},"subtotalPrice":{"amount":"1333.0","currencyCode":"NGN"},"webUrl":"https://the-diva-shop-nigeria.myshopify.com/27201732651/checkouts/b094a4894876e7caa2dad1ffa00b93f9?key=113ef04c5f10e340bd7fc02e262d64d2","customAttributes":[{"key":"utm_source","value":"WhatsappSales"},{"key":"utm_medium","value":"whatsapp-sales"},{"key":"utm_campaign","value":"WhatsappSales"}]}}}} 
SBD_
Shopify Staff
Shopify Staff
1602 227 334

Checking if there's a way to do this that would reflect in the reporting. Will report back!

Scott | Developer Advocate @ Shopify