All Collections
Getting Started
Shopify
Shopify: Step 3 - Setup UTM Parameters on your Ads
Shopify: Step 3 - Setup UTM Parameters on your Ads
How to setup UTM parameters for all of the ads you are tracking for your Shopify Workspace.
Tom King avatar
Written by Tom King
Updated over a week ago

Setting up your UTM parameters correctly is ESSENTIAL for accurate attribution with Cometly. If any of your ads are not set up correctly then Cometly will not be able to track a portion of your sales (i.e. Cometly will not track any purchases from an ad if it does not have the correct UTM set up). If you follow the instructions below, your UTM setup will be perfect for tracking your ads with Cometly.

Setup UTM Parameters on your Meta Ads

The following UTM parameters are required on every Meta Ad that you want to track with Cometly:

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

To set these up inside the FB Ads manager, navigate to the ad level and select an ad that you want to track with Cometly. There should be a section titled "Destination" with a box for "Website URL". Simply paste the above UTM parameter code onto the end of the Website URL that you have in this section.

Please Note - the instructions in this article are for Single Image/Video ads

-If you are running any Carousel Ads (multiple Website URLs), follow the directions in this article

-If you are running Catalogue Ads (dynamic Website URLs), follow the directions in this article

-If you using an "Existing Post" in the ad, follow the directions in this article

-If you have a link to your store in the copy of your ad, follow the directions in this article

Before you publish the ad, make sure this area on the ad level is completely EMPTY like in the screenshot below:

PLEASE NOTE: Make sure you do not use any of the same parameters more than once in your UTM string (i.e. do not use utm_content={{ad.id}} AND utm_content=paid in the same UTM string).

ALSO - If there is another "?" in your Website URL (for example if you have a variant in your URL), that means you are already using UTMs, so you would need to switch the "?" to a "&" before adding it to the end of your Website URL,

For example, if your Website URL is:

www.test.com?variant=123456

Then instead of adding:

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

You would need to add:

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

So your final Website URL would be:

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

Now you can go ahead and publish your ad. As long as you use this setup process on EVERY ad, your tracking and attribution with Cometly will be PERFECT.

You can quickly check that every ad is set up correctly by navigating to the ad level in the FB Ads manager, and selecting the column option "Setup" which will show you a column for Website URL and column for URL Parameters. As you can see below, this makes it very easy to quickly check that all of your ads are set up correctly.

Setup UTM Parameters on your Google Ads

Cometly needs the following UTM parameter code attached to the end of every Website URL in the 'Tracking Template' section of each of your regular Google ad campaigns that are not Smart Campaigns:

{lpurl}?utm_source=google&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}&utm_medium={creative}

Cometly needs the following UTM parameter code attached to the end of every Website URL in the 'Tracking Template' section of each of your Google Smart Campaigns:

{lpurl}?utm_source=google&utm_medium={network}&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}&ref=smart

To set these up inside the Google Ads manager, navigate to Settings > Campaign Settings and select the campaigns that you want to track with Cometly. Then click Edit > Change tracking templates.

Then you should see a box labeled New tracking template and this is where you will need to place the UTM parameters listed above.

Once those parameters have been pasted, you can click "Apply" to apply those changes.

Setup UTM Parameters on your TikTok Ads

Cometly needs the UTM parameter code attached to the end of every Website URL in the "Destination page" section of each of your TikTok ads:

?utm_source=tiktok&utm_medium=__CID__

To set this up inside the TikTok Ads manager, navigate to the ad level and select an ad that you want to track with Cometly. There should be a section titled "Destination page" with a box for "Website URL".

Simply "copy" the above code (include the "?") and "paste" the code at the end of your Website URL in that section.

PLEASE NOTE: Make sure you do not use any of the above parameters more than once in your UTM string (i.e., do not use utm_content=__CID__ AND utm_content=paid in the same UTM string).

ALSO - If there is another ? in your Website URL, that means you are already using UTMs, so you would need to switch the first "?" to a "&" before adding it to the end of your Website URL,

i.e. if your Website URL is

www.test.com?variant=12345667

then instead of

?utm_source=tiktok&utm_medium=__CID__

you would want to add

&utm_source=tiktok&utm_medium=__CID__

So your Final website URL would be

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

Now you can go ahead and publish your ad. As long as you use this setup process on EVERY ad, your tracking and attribution with Cometly for TikTok ads will be PERFECT.

Please reach out to support with any questions about setting up the UTM parameters on your TikTok Ads.


If you do not want to use the default UTM tracking parameters provided by Cometly, and you are already using Ad ID and Site Source in your existing UTM parameter setup, then you can configure the UTMs in Cometly to reflect your current setup by following the instructions in this article.


Your UTMs are now set up on all of your ads! You can navigate back to the Getting Started page and mark Step 3 as "complete", and you can move on to Step 4 - Import your existing ad campaigns into Cometly.

Did this answer your question?