Help center › Data and accounts
Labels in ad links
Megametrics ties an ad campaign to website sessions and shop orders by the utm_campaign label in the ad link. Ready-made labels for each ad platform and where to put them.
How a campaign finds its label
Megametrics looks for the campaign among the utm_campaign values recorded by your counter, GA4 or Yandex Metrica:
- by the campaign name: case, spaces and punctuation don't matter, so
Brand | Searchandbrand_searchare the same label. For Meta, the platform Megametrics adds to the name, such as “· Instagram”, is left out; - by the campaign ID, if no name matches.
A campaign has one label: a manual link comes first, then the name, then the ID. To link a campaign by hand, open Explorer, choose the Ads and website dataset and click Campaign labels. The same label finds the campaign's orders in Shopify. Labels come from the website counter: without GA4 or Yandex Metrica, shop orders aren't tied to campaigns.
The ID is the most reliable label: it stays the same when a campaign is renamed, and no two campaigns share it. So the templates below put the campaign ID into utm_campaign with the platform's own macro. The platform replaces the macro with the real value on every click.
The template
utm_source=<platform>&utm_medium=cpc&utm_campaign=<campaign ID>&utm_content=<ad ID>
utm_sourceis the platform,utm_mediumiscpcorpaid.utm_campaignis the campaign ID: Megametrics matches by it.utm_contentandutm_termare the ad and the keyword, where the platform has a macro for them.
Enter the parameters in the fields named below without a leading ?: the platform adds them to the ad's address itself. Where the platform offers a builder with a field per parameter, enter each value in its field.
Labels for each platform
Google Ads
utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}
- Field: Final URL suffix. For the whole account, it's in Admin → Account settings → Tracking template. For one campaign, use the Tracking template column on the Settings tab of the campaign list.
{creative}is the ad ID,{keyword}is the keyword on the Search Network.- If Google Ads is linked to GA4 and auto-tagging is on, GA4 takes the campaign name from Google Ads and ignores labels in the link. Megametrics then finds the campaign in GA4 by its name, with no labels at all.
- Yandex Metrica and Shopify read only the link. If you use them as well, put the campaign name in
utm_campaigninstead of{campaignid}, in each campaign's own suffix: Google Ads has no macro for the name. Then GA4, Metrica and Shopify see the same label.
Microsoft Advertising
utm_source=bing&utm_medium=cpc&utm_campaign={CampaignId}&utm_content={AdId}&utm_term={keyword}
- Field: Final URL suffix. For the whole account, it's in Campaigns → Settings → Account level options. For one campaign, it's in the campaign's Settings → Campaign URL options.
- Auto-tagging of UTM in Account level options adds
utm_campaignwith the campaign name by itself, and Megametrics matches it by name. To use the ID, turn auto-tagging off: with both, labels can repeat in the link.
Meta
utm_source={{site_source_name}}&utm_medium=paid&utm_campaign={{campaign.id}}&utm_content={{ad.id}}
- Field: at the ad level, Tracking → URL parameters, or Build a URL parameter. These parameters replace the same ones in Website URL.
{{site_source_name}}becomesfb,ig,msg,anorth: Facebook, Instagram, Messenger, Audience Network or Threads.- Use the ID rather than
{{campaign.name}}:{{campaign.name}}keeps the campaign name from when the ad was first published, even after a rename. Megametrics splits a Meta campaign by Meta platform — Facebook, Instagram and others — and both the ID and the name match every part of the campaign. - Meta doesn't fill dynamic parameters in collection ads on Instagram.
TikTok
utm_source=tiktok&utm_medium=paid&utm_campaign=__CAMPAIGN_ID__&utm_content=__CID__
- Field: in the ad's Ad details, enter the destination URL, then Build URL parameters.
__CID__is the creative ID.
utm_source=linkedin&utm_medium=paid&utm_campaign={{AD_SET_ID}}&utm_content={{AD_ID}}
- Field: URL tracking parameters in the ad set settings. Dynamic parameters also work at the ad account level.
- Since October 2025, Campaign Manager calls campaign groups “campaigns” and campaigns “ad sets”. Megametrics loads ad sets as campaigns, so the label is
{{AD_SET_ID}}. If your Campaign Manager still shows the old terms, use{{CAMPAIGN_ID}}and{{CREATIVE_ID}}. - Values can contain only Latin letters, digits,
_,+and-.
Yandex Direct
utm_source=yandex&utm_medium=cpc&utm_campaign={campaign_id}&utm_content={ad_id}&utm_term={keyword}
- Field: the URL parameters block in the campaign settings. Ad groups and ads have the same block, and theirs comes first. After a change, ads go through moderation again.
- Direct sometimes shortens
utm_source=yandextoya. Matching doesn't depend on it.
VK Ads
utm_source=vk_ads&utm_medium=cpc&utm_campaign={{ad_plan_id}}&utm_content={{banner_id}}
- Field: at step 2, Ad groups, the URL Parameters block, Add UTM tags manually.
- The automatic tags of VK Ads put the
{{campaign_id}}macro inutm_campaign. In VK Ads that's the ad group ID, while Megametrics loads campaigns. So add the tags manually, with{{ad_plan_id}}, the campaign ID.
utm_source=pinterest&utm_medium=paid&utm_campaign={campaignid}&utm_content={adid}
- Field: when you create a campaign, in URL tracking, tick Apply URL parameters automatically to all destination URLs in this campaign and replace the default values with these. Or add
?and the parameters to the ad's Destination URL. - Parameters from the campaign settings don't replace those already written in the destination URL.
- Dynamic parameters are filled in live ads only, not in the preview.
Snapchat
utm_source=snapchat&utm_medium=paid&utm_campaign={{campaign.id}}&utm_content={{ad.id}}
- Field: in the ad details, Build a URL Parameter.
X
utm_source=x&utm_medium=paid&utm_campaign=brand_search
- The X help doesn't describe dynamic parameters for ad links, so the label is written by hand: add
?and the parameters to the website address in each ad. - Put the campaign name in
utm_campaign, the way it's written in X Ads. The ID shown in X Ads is not the form Megametrics gets from the API, so it won't match. - If you rename the campaign, change the label too.
Amazon Ads
A Sponsored Products ad leads to the product page on Amazon, not to your website, so labels don't apply to it. Megametrics doesn't mark Amazon Ads campaigns no label.
Check the labels
- After the next load, open Campaign labels in Explorer: each campaign shows whether its label was found by name, found by ID or isn't on the site. If a site label shows a macro in braces instead of a value, the platform didn't fill it: check the field.
- On the Campaigns page, the Payback and Reconcile views show the label under the campaign name. A campaign with 100 or more clicks in the period, but sessions with its label under 20% of the clicks, is marked no label, or few sessions with label if the label is found. Clicks are counted for the whole label: campaigns sharing a label, and the parts of a Meta campaign, count together.
- Over the last 7 days, the same condition raises the Clicks don't reach the website with a label signal. See Signals and alerts.
Next: Website code and events
Didn't find the answer?
Write to us — a person replies within one working day.