Campaigm UTM URL paramaters being removed from product pages

Topic summary

UTM parameters are being removed from product URLs that include a variant parameter, preventing campaign and affiliation tracking. UTM (Urchin Tracking Module) tags track marketing sources; the variant query param selects a specific product option.

  • Using ampersand (&) to chain params after ?variant=ID initially worked for one user, but several others report all non-variant params still get stripped. This is not an HTTP redirect (responses show 200), likely a Shopify JavaScript URL rewrite on product pages with variants.

  • Suggestions included using the anchor (#) for UTMs and checking analytics library differences (analytics.js reads anchor; ga.js needs _setAllowAnchor). These help tracking but do not stop Shopify’s query-string cleanup.

  • One workaround: custom code that captures/sends query params before Shopify’s rewrite executes. This solved tracking for one site but the code wasn’t shared and isn’t a general fix.

  • Another idea: remove variant-specific URLs via theme changes to keep a single product URL; downside is losing direct variant links and potential add-to-cart issues.

  • Current status: No confirmed platform/app fix. Multiple users still affected; some ask for shared code. A recent report claims UTMs now appear on a sample link, but no changes were disclosed. Discussion remains open.

Summarized with AI on January 15. AI used: gpt-5.

I’m struggling with this issue too and the suggested solutions do not work. Take this URL:

https://shop.heddels.com/collections/battenwear/products/bouldering-pants-caramel-fw20?variant=39575475978307

If I add a utm_medium=email like so:

https://shop.heddels.com/collections/battenwear/products/bouldering-pants-caramel-fw20?variant=39575475978307&utm_medium=email

The utm_medium parameter is stripped (I believe by JS) and I end up at the original URL:

https://shop.heddels.com/collections/battenwear/products/bouldering-pants-caramel-fw20?variant=39575475978307

This happens with any added query param other than variant.

Does anyone know how I can resolve this?

2 Likes