A space to discuss online store customization, theme development, and Liquid templating.
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:
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
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.
@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
@SoldLive Unfortunately, no. We opened a partner support ticket about this issue, but haven't heard back on this yet.
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.
@malik112 I haven't heard anything back from the partner support ticket and this appears to still be an issue.
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?
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.