Shopify cart add URL does not pass along query parameters (including UTM)

Shopify cart add URL does not pass along query parameters (including UTM)

MarcBaumbach
Shopify Partner
32 0 15

Hello! I'm not sure if anyone else has experienced this and knows of a workaround, but when creating an "Add to cart" button in our emails, we'd like to include UTM parameters such that any orders placed after a click-through are appropriately tracked as a conversion in Shopify. We use a link like the following:

https://our-store.myshopify.com/cart/add/45468650505?utm_campaign=Welcome-6380950a0d5f497a84b4c54817...

This correctly adds the item to the cart and redirects to the cart page, but the UTM parameters (or any query parameters for that matter) are not passed along to the redirected cart page and then an order that is placed does not track the conversion based on our original UTM parameters. It appears the 302 redirect to the /cart URL after using a URL like the one above is simply stripping query parameters.

Is anyone aware of a workaround or is this a known issue? The only one we've found is to use the cart permalink approach (/cart/variant-id:quantity), as that preserves the UTM parameters, but we don't want to send customers directly to the checkout from an email. That would be more like a "Buy now" button.

The other options would be a custom app proxy or script tag that performs a similar behavior, but we'd prefer to use the native APIs/functionality that Shopify has built-in.

Any ideas or thoughts would be appreciated!

Thanks,

Marc

Replies 8 (8)

Gerhard1
Visitor
1 0 0

I'm wondering if there has been an update about this? Like Marc says, the checkout permalink works and passes along the other parameters, but is there a way to do this for the cart?


We want to prefill the cart (from an external domain), but not skip it, we use:
/cart/add?id=x&quantity=y
Which works, however any other parameters (like utm tags) in the url are ignored and will be gone after shopify redirects the customer back to /cart.

 

SoldLive
Shopify Partner
26 1 2

@MarcBaumbach  - did you ever find a solution to this? 

 

We are trying to cookie users that we send to the cart for sales attribution. But the UTM parameters are getting removed by Shopify in the /cart redirect

MarcBaumbach
Shopify Partner
32 0 15

@SoldLive Unfortunately, no. We opened a partner support ticket about this issue, but haven't heard back on this yet.

JAS_Technology
Shopify Partner
86 0 62

Hi there. This is something I very recently added to our newly published app, ZipLinks! The app enables the easy building of preloaded cart, or direct-to-checkout, links. A nice vanity URL, preloaded discount, multiple variants with varying quantities, and more. Our goal is to reduce all the friction for constructing these links. Check it out! And I would love any feedback or thoughts.

Happy to hear about your crazy ideas.
malik112
Visitor
2 0 0

Hi @MarcBaumbach any updates on this? thanks.

MarcBaumbach
Shopify Partner
32 0 15

@malik112 I haven't heard anything back from the partner support ticket and this appears to still be an issue.

dkjonzy2
Shopify Partner
3 0 0

I think you can include storefront=true in the permalink params and it will go to the cart page instead of the checkout page. Is that what you are looking for?

jteppinette
Visitor
1 0 0

We are still seeing this issue. When using the `storefront=true` query parameter, cart permalinks do not retain additional query parameters having redirect. This is a significant oversight given the need to track attribution to the cart screen.