UTM Parameters: Step-by-Step Guide for Shopify

UTM parameters show which campaigns drive revenue, not just clicks. Get the exact UTM structure for Meta, Google, TikTok, and Pinterest.
March 18, 2026
Luuk
Latest
Attribution & Data

UTM Parameters: Step-by-Step Guide for Shopify

If you're running paid ads and making decisions based on which campaigns are performing, you need UTM parameters. Without them, you're looking at traffic that "just came from somewhere" - with no visibility into which campaign, ad set, or ad drove it.

UTM parameters are the string of text appended to your ad URLs that tells your analytics and tracking tools exactly where a visitor came from. They're not complicated to implement, but getting them right for each platform - and understanding how TrackBee uses them to improve attribution - requires a clear guide.

What UTM Parameters Are and Why They Matter

UTM stands for Urchin Tracking Module - the tracking system created by Urchin Software (later acquired by Google to become Google Analytics). UTM parameters are query string values you append to URLs to track the source of web traffic.

Without UTM parameters:

  • A visitor who clicked your Meta ad and purchased appears in your analytics as "Social / facebook.com" - no campaign information

  • You can't distinguish traffic from your prospecting campaign vs. your retargeting campaign

  • Budget decisions are based on channel-level data at best, not campaign or ad-level data

With UTM parameters:

  • Every session is tagged with campaign name, ad set, and ad identifiers

  • You can see exactly which Meta campaign, which Google ad group, or which TikTok creative drove each conversion

  • Budget allocation decisions are based on actual performance data at the campaign and ad level

TrackBee captures UTM parameters for every session and stores them in the visitor's Shopper Profile - preserving campaign attribution across sessions, even when the UTM parameters would normally be lost after a session ends.


The Five UTM Parameters Explained

utm_source

  • Required Identifies the traffic source. Use the platform name: meta, google, tiktok, pinterest, email.

utm_medium

  • Optional but recommended Identifies the marketing medium. For paid ads: cpc (cost per click) or paid_social. For email: email.

utm_campaign

  • Required for meaningful analysis Identifies the campaign. Use the campaign name or ID. For ad platforms, use dynamic values that automatically populate the actual campaign name or ID (see platform-specific instructions below).

utm_content

  • Optional Identifies the specific ad or creative. Useful for A/B testing different creatives within the same campaign.

utm_term

  • Optional Identifies paid keywords for search ads. Less commonly used for social ads.

Recommended minimal setup:

At minimum, always include utm_source and utm_campaign. Add dynamic IDs for Meta and Google to enable ad-level analysis.


UTM Setup for Meta Ads

Meta supports dynamic UTM parameters that automatically populate with actual campaign, ad set, and ad values for each ad.

Recommended UTM string for Meta:

Where to add UTMs in Meta:

  1. In Meta Ads Manager, navigate to the Ad level (not campaign or ad set)

  2. In the ad's destination URL, scroll to URL parameters field

  3. Paste the UTM string

Dynamic parameters explained:

  • {{campaign.id}} - automatically replaced with the actual campaign ID for each impression

  • {{adset.id}} - replaced with the actual ad set ID

  • {{ad.id}} - replaced with the actual ad ID

Using campaign IDs (rather than names) is more reliable because IDs don't change when you rename a campaign. TrackBee can map campaign IDs to names in its dashboard.

Important:

When you modify URL parameters at the ad level, Meta marks the ad as "in review" and may briefly pause spend while processing. Make UTM changes during low-traffic periods.

Alternative: Use campaign names directly

Names are human-readable in analytics tools but will change if you rename campaigns - creating inconsistencies in historical data.


UTM Setup for Google Ads

Google Ads offers two approaches: manual UTM strings, or Google's ValueTrack parameters that auto-populate dynamic values.

Recommended UTM string for Google Ads:

Where to add UTMs in Google Ads: Unlike Meta, Google Ads has a dedicated field for tracking templates.

  1. In Google Ads, go to Campaign Settings (or Ad Group Settings for more granular control)

  2. In the Tracking section, find the Final URL Suffix field

  3. Paste your UTM string (without the ? - the ? goes in the final URL itself)

Alternatively, use Campaign URL Options to set a tracking template:

ValueTrack parameters:

  • {campaignid} - auto-populated with campaign ID

  • {adgroupid} - auto-populated with ad group ID

  • {creative} - auto-populated with ad ID

  • {keyword} - auto-populated with the search keyword (useful for search campaigns)

  • {matchtype} - auto-populated with keyword match type (b = broad, e = exact, p = phrase)

Note:

When using both UTM parameters and Google's auto-tagging (gclid), both are preserved. Google's auto-tagging provides richer attribution data to Google Analytics; UTM parameters provide cross-platform visibility. Keep both active. Be aware that iOS 17+ Link Tracking Protection (expanding further in iOS 26) can strip gclid parameters - making UTM-based attribution via server-side tracking even more important as a fallback.


UTM Setup for TikTok Ads

TikTok's URL tracking parameters work similarly to Meta's dynamic values.

__wf_reserved_inherit

Recommended UTM string for TikTok:

Where to add UTMs in TikTok:

  1. In TikTok Ads Manager, at the ad level

  2. In the Destination Page URL field, append the UTM string to your landing page URL

TikTok dynamic macro values:

  • __CAMPAIGN_ID__ - campaign ID

  • __AID__ - ad group ID

  • __CID__ - ad ID

Note the double underscore format - TikTok uses __VALUE__ instead of {{value}} or {value}.


UTM Setup for Pinterest Ads

Pinterest uses a similar dynamic parameter system.

Recommended UTM string for Pinterest:

Where to add UTMs in Pinterest:

  1. In Pinterest Ads Manager, at the ad level

  2. In the Destination Link field, append the UTM string to your landing page URL

Pinterest dynamic parameters:

  • {campaignid} - campaign ID

  • {adgroupid} - ad group ID

  • {adid} - ad creative ID


How TrackBee Uses UTM Parameters

TrackBee captures UTM parameters as part of its Shopper Profile building - and this creates a significant advantage over standard analytics tracking.

The standard UTM problem: When a visitor clicks an ad with UTM parameters and lands on your store, the UTM values are captured in that session. If the visitor doesn't convert in that session and returns later (directly, without clicking another ad), the UTM parameters are gone from the URL. Standard analytics tracks the second visit as direct or organic - the original ad attribution is lost.

How TrackBee solves this: TrackBee stores UTM parameters in the visitor's Shopper Profile the moment they first visit. When they return in a subsequent session - even days later, even on a different device - their Shopper Profile still contains the UTM data from the original session.

When that visitor eventually purchases, the enriched event sent to Meta, Google, and Klaviyo includes the original campaign source, medium, and campaign ID from their first visit. Attribution is preserved across sessions.

What this enables:

  • Your Meta Conversions API events carry campaign context even for multi-session conversions

  • Your Klaviyo events carry UTM source data, enabling segmentation by acquisition channel

  • TrackBee's real-time dashboard shows revenue by UTM source and campaign - without waiting for platform attribution windows to close

For the full dashboard guide: How to use TrackBee's real-time dashboard with UTM parameters.


Common UTM Mistakes to Avoid

Using inconsistent naming conventions utm_source=Meta vs. utm_source=meta vs. utm_source=facebook - these are three separate sources in your analytics. Pick a convention and stick to it. Lowercase, no spaces, use underscores or hyphens for multi-word values.

Not using dynamic parameters If you hardcode campaign names in UTM strings (utm_campaign=summer_sale_2026) instead of using dynamic values (utm_campaign={{campaign.id}}), you need to manually update UTMs every time you create a new campaign. Dynamic parameters eliminate this.

Forgetting UTMs on email links Email is often treated as organic in analytics tools. Any links in your Klaviyo flows should have UTM parameters appended: utm_source=klaviyo&utm_medium=email&utm_campaign=abandoned_cart. Without this, email-driven traffic is misattributed.

Adding UTMs to internal links UTM parameters are for tracking external traffic sources arriving at your site. Using UTM parameters on links within your own website overwrites the visitor's original source attribution - making all internal navigation appear as a "new" traffic source. Never add UTMs to internal navigation links.

Not testing UTM strings before launching campaigns Malformed UTM strings (typos, special characters, incorrect dynamic parameters) result in garbled data or missing data. Always test a UTM string by clicking a preview link and verifying the UTM values appear correctly in your analytics.


Frequently Asked Questions

Do UTM parameters affect SEO? No. Search engines ignore UTM parameters when crawling and indexing pages. UTM parameters in URLs do not create duplicate content issues or affect rankings. Google canonicalizes UTM-tagged URLs to their base URL.

Should I use the same UTM structure for all platforms? The utm_source value should differ per platform (meta, google, tiktok, pinterest). The utm_medium should reflect the channel type. Everything else can follow a consistent naming convention across platforms.

What if I use a URL shortener for my ads? UTM parameters should be appended to the destination URL - the page on your store - not the shortened URL. If you're using a URL shortener that doesn't pass UTM parameters to the destination, your tracking will break. Use redirect-preserving URL shorteners, or avoid shorteners for ad destination URLs entirely.

How do UTM parameters interact with Shopify's built-in tracking? Shopify's analytics uses UTM parameters to attribute sessions to sources. GA4 also reads UTM parameters. UTM data flows through to both - TrackBee additionally stores UTM data in Shopper Profiles for cross-session preservation.

What's the difference between UTM tracking and auto-tagging (gclid)? Google's auto-tagging appends a gclid parameter to URLs from Google Ads. This provides richer attribution data to Google Analytics than UTM parameters. UTM parameters work across all platforms and analytics tools. Best practice is to use both: keep Google's auto-tagging enabled and add UTM parameters for cross-platform visibility.

In this article
Boost Your Revenue
Track Missing Conversion Data
Lorem Ipsum

Boost Your Revenue

Track & Enrich
Missing Conversion Data

Try for free
Share this:

If you're running paid ads and making decisions based on which campaigns are performing, you need UTM parameters. Without them, you're looking at traffic that "just came from somewhere" - with no visibility into which campaign, ad set, or ad drove it.

UTM parameters are the string of text appended to your ad URLs that tells your analytics and tracking tools exactly where a visitor came from. They're not complicated to implement, but getting them right for each platform - and understanding how TrackBee uses them to improve attribution - requires a clear guide.

What UTM Parameters Are and Why They Matter

UTM stands for Urchin Tracking Module - the tracking system created by Urchin Software (later acquired by Google to become Google Analytics). UTM parameters are query string values you append to URLs to track the source of web traffic.

Without UTM parameters:

  • A visitor who clicked your Meta ad and purchased appears in your analytics as "Social / facebook.com" - no campaign information

  • You can't distinguish traffic from your prospecting campaign vs. your retargeting campaign

  • Budget decisions are based on channel-level data at best, not campaign or ad-level data

With UTM parameters:

  • Every session is tagged with campaign name, ad set, and ad identifiers

  • You can see exactly which Meta campaign, which Google ad group, or which TikTok creative drove each conversion

  • Budget allocation decisions are based on actual performance data at the campaign and ad level

TrackBee captures UTM parameters for every session and stores them in the visitor's Shopper Profile - preserving campaign attribution across sessions, even when the UTM parameters would normally be lost after a session ends.


The Five UTM Parameters Explained

utm_source

  • Required Identifies the traffic source. Use the platform name: meta, google, tiktok, pinterest, email.

utm_medium

  • Optional but recommended Identifies the marketing medium. For paid ads: cpc (cost per click) or paid_social. For email: email.

utm_campaign

  • Required for meaningful analysis Identifies the campaign. Use the campaign name or ID. For ad platforms, use dynamic values that automatically populate the actual campaign name or ID (see platform-specific instructions below).

utm_content

  • Optional Identifies the specific ad or creative. Useful for A/B testing different creatives within the same campaign.

utm_term

  • Optional Identifies paid keywords for search ads. Less commonly used for social ads.

Recommended minimal setup:

At minimum, always include utm_source and utm_campaign. Add dynamic IDs for Meta and Google to enable ad-level analysis.


UTM Setup for Meta Ads

Meta supports dynamic UTM parameters that automatically populate with actual campaign, ad set, and ad values for each ad.

Recommended UTM string for Meta:

Where to add UTMs in Meta:

  1. In Meta Ads Manager, navigate to the Ad level (not campaign or ad set)

  2. In the ad's destination URL, scroll to URL parameters field

  3. Paste the UTM string

Dynamic parameters explained:

  • {{campaign.id}} - automatically replaced with the actual campaign ID for each impression

  • {{adset.id}} - replaced with the actual ad set ID

  • {{ad.id}} - replaced with the actual ad ID

Using campaign IDs (rather than names) is more reliable because IDs don't change when you rename a campaign. TrackBee can map campaign IDs to names in its dashboard.

Important:

When you modify URL parameters at the ad level, Meta marks the ad as "in review" and may briefly pause spend while processing. Make UTM changes during low-traffic periods.

Alternative: Use campaign names directly

Names are human-readable in analytics tools but will change if you rename campaigns - creating inconsistencies in historical data.


UTM Setup for Google Ads

Google Ads offers two approaches: manual UTM strings, or Google's ValueTrack parameters that auto-populate dynamic values.

Recommended UTM string for Google Ads:

Where to add UTMs in Google Ads: Unlike Meta, Google Ads has a dedicated field for tracking templates.

  1. In Google Ads, go to Campaign Settings (or Ad Group Settings for more granular control)

  2. In the Tracking section, find the Final URL Suffix field

  3. Paste your UTM string (without the ? - the ? goes in the final URL itself)

Alternatively, use Campaign URL Options to set a tracking template:

ValueTrack parameters:

  • {campaignid} - auto-populated with campaign ID

  • {adgroupid} - auto-populated with ad group ID

  • {creative} - auto-populated with ad ID

  • {keyword} - auto-populated with the search keyword (useful for search campaigns)

  • {matchtype} - auto-populated with keyword match type (b = broad, e = exact, p = phrase)

Note:

When using both UTM parameters and Google's auto-tagging (gclid), both are preserved. Google's auto-tagging provides richer attribution data to Google Analytics; UTM parameters provide cross-platform visibility. Keep both active. Be aware that iOS 17+ Link Tracking Protection (expanding further in iOS 26) can strip gclid parameters - making UTM-based attribution via server-side tracking even more important as a fallback.


UTM Setup for TikTok Ads

TikTok's URL tracking parameters work similarly to Meta's dynamic values.

__wf_reserved_inherit

Recommended UTM string for TikTok:

Where to add UTMs in TikTok:

  1. In TikTok Ads Manager, at the ad level

  2. In the Destination Page URL field, append the UTM string to your landing page URL

TikTok dynamic macro values:

  • __CAMPAIGN_ID__ - campaign ID

  • __AID__ - ad group ID

  • __CID__ - ad ID

Note the double underscore format - TikTok uses __VALUE__ instead of {{value}} or {value}.


UTM Setup for Pinterest Ads

Pinterest uses a similar dynamic parameter system.

Recommended UTM string for Pinterest:

Where to add UTMs in Pinterest:

  1. In Pinterest Ads Manager, at the ad level

  2. In the Destination Link field, append the UTM string to your landing page URL

Pinterest dynamic parameters:

  • {campaignid} - campaign ID

  • {adgroupid} - ad group ID

  • {adid} - ad creative ID


How TrackBee Uses UTM Parameters

TrackBee captures UTM parameters as part of its Shopper Profile building - and this creates a significant advantage over standard analytics tracking.

The standard UTM problem: When a visitor clicks an ad with UTM parameters and lands on your store, the UTM values are captured in that session. If the visitor doesn't convert in that session and returns later (directly, without clicking another ad), the UTM parameters are gone from the URL. Standard analytics tracks the second visit as direct or organic - the original ad attribution is lost.

How TrackBee solves this: TrackBee stores UTM parameters in the visitor's Shopper Profile the moment they first visit. When they return in a subsequent session - even days later, even on a different device - their Shopper Profile still contains the UTM data from the original session.

When that visitor eventually purchases, the enriched event sent to Meta, Google, and Klaviyo includes the original campaign source, medium, and campaign ID from their first visit. Attribution is preserved across sessions.

What this enables:

  • Your Meta Conversions API events carry campaign context even for multi-session conversions

  • Your Klaviyo events carry UTM source data, enabling segmentation by acquisition channel

  • TrackBee's real-time dashboard shows revenue by UTM source and campaign - without waiting for platform attribution windows to close

For the full dashboard guide: How to use TrackBee's real-time dashboard with UTM parameters.


Common UTM Mistakes to Avoid

Using inconsistent naming conventions utm_source=Meta vs. utm_source=meta vs. utm_source=facebook - these are three separate sources in your analytics. Pick a convention and stick to it. Lowercase, no spaces, use underscores or hyphens for multi-word values.

Not using dynamic parameters If you hardcode campaign names in UTM strings (utm_campaign=summer_sale_2026) instead of using dynamic values (utm_campaign={{campaign.id}}), you need to manually update UTMs every time you create a new campaign. Dynamic parameters eliminate this.

Forgetting UTMs on email links Email is often treated as organic in analytics tools. Any links in your Klaviyo flows should have UTM parameters appended: utm_source=klaviyo&utm_medium=email&utm_campaign=abandoned_cart. Without this, email-driven traffic is misattributed.

Adding UTMs to internal links UTM parameters are for tracking external traffic sources arriving at your site. Using UTM parameters on links within your own website overwrites the visitor's original source attribution - making all internal navigation appear as a "new" traffic source. Never add UTMs to internal navigation links.

Not testing UTM strings before launching campaigns Malformed UTM strings (typos, special characters, incorrect dynamic parameters) result in garbled data or missing data. Always test a UTM string by clicking a preview link and verifying the UTM values appear correctly in your analytics.


Frequently Asked Questions

Do UTM parameters affect SEO? No. Search engines ignore UTM parameters when crawling and indexing pages. UTM parameters in URLs do not create duplicate content issues or affect rankings. Google canonicalizes UTM-tagged URLs to their base URL.

Should I use the same UTM structure for all platforms? The utm_source value should differ per platform (meta, google, tiktok, pinterest). The utm_medium should reflect the channel type. Everything else can follow a consistent naming convention across platforms.

What if I use a URL shortener for my ads? UTM parameters should be appended to the destination URL - the page on your store - not the shortened URL. If you're using a URL shortener that doesn't pass UTM parameters to the destination, your tracking will break. Use redirect-preserving URL shorteners, or avoid shorteners for ad destination URLs entirely.

How do UTM parameters interact with Shopify's built-in tracking? Shopify's analytics uses UTM parameters to attribute sessions to sources. GA4 also reads UTM parameters. UTM data flows through to both - TrackBee additionally stores UTM data in Shopper Profiles for cross-session preservation.

What's the difference between UTM tracking and auto-tagging (gclid)? Google's auto-tagging appends a gclid parameter to URLs from Google Ads. This provides richer attribution data to Google Analytics than UTM parameters. UTM parameters work across all platforms and analytics tools. Best practice is to use both: keep Google's auto-tagging enabled and add UTM parameters for cross-platform visibility.

Latest

Discover other Blogs

Explore our collection of informative and engaging blog posts.

Why Your Shopify Sales Don't Match Meta and Google Ads
Frank
Frank
9
min read
Shopify Conversion Rate Drop? Check Your Tracking
Frank
Frank
10
min read
How to Fix Underreported Conversions on Shopify
Frank
Frank
10
min read