UTM parameters for Facebook, Google and TikTok ads: how to tag every ad
UTM parameters are short tags added to the end of a link, such as utm_source=facebook, that tell Google Analytics where a visit came from. For ads, you don't type them by hand: each ad platform fills in the campaign, ad set and ad names for you through dynamic parameters. Set it up once and every new ad is tagged.
The tags only help if the visit and the sale are both recorded. If you want to see what your store sends today, run the free Tracking Check first. It takes about two minutes.
What UTM parameters are
Google Analytics reads five tags from a link (Google Analytics Help, collect campaign data with custom URLs):
utm_source: where the click came from, likefacebook,googleortiktok.utm_medium: the type of traffic, likecpc,paid_socialoremail.utm_campaign: the campaign name.utm_content: tells ads apart, like the ad name.utm_term: the keyword, or any extra detail you want.
A link with tags looks like this:
https://yourstore.com/collections/summer?utm_source=facebook&utm_medium=paid_social&utm_campaign=summer_sale
The page is the same. Only your reports change. Without tags, GA4 has to work out the source on its own, and some visits end up as Direct or Unassigned.
Naming rules that keep GA4 channels right
GA4 sorts traffic into channels, like Paid Social and Paid Search, from the source and medium it sees (Google Analytics Help, default channel group). A pair it doesn't recognise lands in Unassigned or in the wrong channel. Four rules prevent that:
- Use standard mediums.
cpcfor paid search,paid_socialfor paid social,emailfor email. - Lowercase only. Google says UTM values are case-sensitive, so
Facebookandfacebookbecome two rows in your reports. - No spaces. Use
_instead. A space becomes%20in the link and makes reports hard to read. - One name for one thing. Pick
facebook, notfacebookon one ad andfbon the next.
Dynamic parameters pass on whatever name you gave your campaign. So name campaigns in lowercase with underscores inside the ad platform too, like summer_sale_2026.
Meta ads: the URL parameters field
In Meta Ads Manager, open your ad and find the URL parameters field under the destination. Paste this:
utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_term={{adset.name}}
Meta replaces {{campaign.name}}, {{ad.name}} and {{adset.name}} with the real names when someone clicks. Don't type your own values in their place.
Use paid_social, not social, so GA4 puts the visit in Paid Social. Put the same string on every ad, or copy it down from the campaign level so new ads inherit it.
Google Ads: keep auto-tagging, add a tracking template
Google Ads has its own tag called the GCLID. Auto-tagging adds it to your ad links so Google Ads and Google Analytics can match clicks to sales (Google Ads Help, auto-tagging). Keep it on. UTMs are an addition, not a replacement.
To add UTMs, set one tracking template at account level in Google Ads. It uses ValueTrack parameters, which Google fills in at click time (Google Ads Help, ValueTrack parameters):
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}
{lpurl}is your landing page, the final URL of the ad.{campaignid}is the campaign's number. It is not the name, so keep a short list that maps ID to name.{creative}is the ad ID and{keyword}is the keyword that triggered the ad.
One template covers every campaign, so you don't tag ads one by one. Keep your UTMs in this one place, so a link never carries two sets.
TikTok ads: URL parameters with double underscores
TikTok Ads Manager has a URL parameters field on the ad. TikTok's dynamic parameters are written in capitals between double underscores (TikTok Business Help Center, search "dynamic URL parameters"):
utm_source=tiktok&utm_medium=paid_social&utm_campaign=__CAMPAIGN_NAME__&utm_content=__CID_NAME__&utm_term=__AID_NAME__
__CAMPAIGN_NAME__ is the campaign, __AID_NAME__ is the ad group and __CID_NAME__ is the ad. Check the current list in the Help Center before you paste, because platforms add and rename parameters.
Check a link before the ad goes live
A broken tag costs you data for the whole run of an ad. Before you publish:
- Open the live ad link in a browser and look at the address bar. The tags should show, with the names filled in.
- Check there is no
#before the tags. Anything after a#is cut off. - Check there is only one
?. A second tag block starts with&, not?. - A day later, open GA4, go to Reports, Acquisition, Traffic acquisition and look at the Session source / medium column. You should see
facebook / paid_social,google / cpcandtiktok / paid_social.
If a click ID such as fbclid or gclid disappears when someone lands on your store, a redirect is dropping it. Our free Click ID Checker shows that in seconds. On iPhone, Safari's Link Tracking Protection can also strip fbclid from some links before the page loads.
Tag many links at once
For a launch with ten landing pages, typing tags is slow and invites typos. The free UTM Builder has three tabs:
- One link: fill in source, medium and campaign and get the finished link. It lowercases everything and swaps spaces for
_. - Bulk links: paste one URL per line, set source, medium and campaign once, then copy all the links or download a CSV.
- Check a link: paste any tagged link and it lists each parameter, the GA4 channel it lands in, and what is wrong.
It also has presets for Meta, Google Ads and TikTok Ads that fill in the dynamic parameters shown above, so you can copy the exact string for each platform.
Where UTMs fit in your GA4 setup
UTMs go on the link, and GA4 reads them when the visit starts. They don't need a tracking server. If your store sends events to GA4 from a server, the page URL with its tags still goes along. If you have not set GA4 up on Shopify yet, start with our GA4 ecommerce tracking guide for Shopify and our page on server-side GA4 for Shopify.
If GA4 and Shopify show different numbers, our post on Shopify analytics vs Google Analytics explains why.
FAQ
What are UTM parameters?
They are tags at the end of a link: utm_source, utm_medium, utm_campaign, utm_content and utm_term. Google Analytics reads them to show where a visit came from and which campaign sent it.
What should utm_medium be for Facebook ads?
Use paid_social. GA4 groups source and medium pairs like facebook / paid_social into its Paid Social channel. Values like social or fb can land in other channels or in Unassigned.
Do I need UTMs on Google Ads if auto-tagging is on?
Auto-tagging is what lets Google Ads and Google Analytics share click data, so keep it on. UTMs are optional. Add them in the tracking template if you want to see the campaign in tools that read only UTM tags.
Are UTM parameters case-sensitive?
Yes. Google Analytics treats Facebook and facebook as different values. Use lowercase everywhere, and use _ instead of spaces.
Why does GA4 show my traffic as Unassigned?
Usually the source and medium pair isn't one GA4 recognises, or the values have capital letters or spaces. Stick to standard mediums like cpc, paid_social and email, and check the link with the UTM Builder.
UTMs say where a visit came from, not whether the sale arrived
UTMs are labels on the click. If the purchase never reaches GA4, Meta or Google Ads, the order has no source to carry, and the campaign that earned it gets no credit. Tags can be perfect and the report can still be short of real orders.
The free Tracking Check shows what your store sends today. If you would rather talk it through, you can book a call.
Get tracking tips by email
Short, practical fixes for Meta, Google Ads and GA4, from Abir.
You’re in. First tip lands soon.