All Collections
Troubleshooting
How to apply UTM parameters to a URL that contains "variant" parameter
How to apply UTM parameters to a URL that contains "variant" parameter

Variants are a common URL parameter. If you have variant in your URL you need to follow the instruction int this article to apply your UTMs

Updated over a week ago

Sometimes when editing one of your ads you may find that your ad is already using URL parameters. You this is easily identified if you spot a "?" symbol anywhere in your Website URL. The most common URL parameter on Shopify would be the variant, which you will see if your product has multiple versions, i.e. different sizes or colors

If your product page uses a variant, then you will need to adjust your UTM parameters so that you do not use more than one "?" symbol. Instead of pasting your UTM code with "?" symbol, you will paste the code in with a "&" symbol instead.

For example, if your Website URL on your Facebook ad is:

www.test.com?variant=123456

Then instead of adding:

?utm_source={{site_source_name}}&utm_content={{ad.id}}

You would need to add:

&utm_source={{site_source_name}}&utm_content={{ad.id}}

So your final Website URL would be:

www.test.com?variant=123456&utm_source={{site_source_name}}&utm_content={{ad.id}}

For another example, if your Website URL on TikTok is:

www.test.com?variant=12345667

Then instead of adding:

?utm_source=tiktok&utm_content=__CID__

You would want to add:

&utm_source=tiktok&utm_content=__CID__

So your final Website URL would be:

www.test.com?variant=12345667&utm_source=tiktok&utm_content=__CID__

Once you have the UTM code setup correctly for the variant code, you can go ahead and publish your ad.

Did this answer your question?