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

Highlighted
Shopify Partner
21 0 6

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

0 Likes
Highlighted
New Member
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.

 

0 Likes
Highlighted
Shopify Partner
16 1 2

@Marc_Baumbach  - 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

0 Likes
Highlighted
Shopify Partner
21 0 6

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

0 Likes
Highlighted
Shopify Expert
71 0 38

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.

0 Likes