The URL parameters to add to your ads on Meta, Google Ads, TikTok, Microsoft Ads, LinkedIn, Pinterest, Snapchat, Reddit and X so the campaign, ad set and ad of every visit and lead reach AxiTrace, what the ID confidence of a click means and how campaign names are matched.

Tracking URL parameters per ad platform

A click id such as gclid or fbclid tells AxiTrace which platform a visitor came from, but on most platforms it does not say which campaign, ad set or ad. This page lists, for each ad platform, the URL parameters to add to your ads so those ids reach AxiTrace, and the platform's own dynamic placeholder that fills each id in automatically. The ids are used for the first click and the last click of every lead, and for the campaign reports of your orders.

You set this up in your ad accounts

AxiTrace never edits your ads. You, or the person who manages your ad accounts, add the parameters below to the ad's URL, URL parameters field, final URL suffix or tracking template. The click ids themselves (gclid, fbclid, ttclid, msclkid, li_fat_id, epik, ScCid, rdt_cid, twclid) are added by the platforms and captured automatically; you do not add them.

Readable UTM names (utm_source, utm_medium, utm_campaign) are still recommended next to the ids. How to write them is explained in Campaign URL Parameters.

Summary

Platform Click id (automatic) Campaign Ad set / ad group Ad
Meta (Facebook, Instagram) fbclid campaign_id adset_id ad_id
Google Ads gclid, gbraid, wbraid campaignid adgroupid -
TikTok ttclid utm_id - -
Microsoft Ads msclkid ms_campaign_id ms_adgroup_id ms_ad_id
LinkedIn li_fat_id li_campaign_id - li_creative_id
Pinterest epik pin_campaign_id pin_adgroup_id pin_ad_id
Snapchat ScCid sc_campaign_id sc_adsquad_id sc_ad_id
Reddit rdt_cid rdt_campaign_id rdt_adgroup_id rdt_ad_id
X twclid x_campaign_id x_adgroup_id x_ad_id

On every platform you can also put the campaign id in utm_id. A dash means AxiTrace does not read that level for the platform.

Check one live click

Placeholders are replaced by the platform only when the ad is served, never in a preview. After saving, click a live ad and look at the address bar: each parameter must carry digits, not the placeholder text. A placeholder the platform does not fill arrives as literal text, and on platforms whose campaigns AxiTrace does not import (see below) nothing can tell it apart from a real id.

Meta (Facebook, Instagram)

In Ads Manager, open the ad, go to Tracking and paste this into URL parameters. Meta replaces {{campaign.id}}, {{adset.id}} and {{ad.id}} with the ids of the ad that was clicked.

utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&campaign_id={{campaign.id}}&adset_id={{adset.id}}&ad_id={{ad.id}}

AxiTrace stores these as fb_campaign_id, fb_adset_id and fb_ad_id. The older names fbcampaignid, fbadsetid and fbadid are still read. When the ad set is missing, it is taken from the ad through your account's structure.

In Google Ads, open Admin > Account settings > Tracking (or the campaign's settings) and paste this into Final URL suffix. {campaignid} and {adgroupid} are Google's ValueTrack parameters.

campaignid={campaignid}&adgroupid={adgroupid}
  • AxiTrace stores these as ga_campaign_id and ga_adgroup_id. The ad group is used only under a matched campaign of your connected account.
  • Google does not report which ad was clicked in a way AxiTrace reads, so there is no ad level for Google. {creative} is not needed.
  • Performance Max has no ad groups, so {adgroupid} stays empty there. The campaign still comes from {campaignid}.
  • Without the suffix, a gclid click is still resolved to its campaign once your Google Ads account is connected (ID confidence click_id). Google's own gad_campaignid on the landing URL is used only when it names a campaign of the connected account: for Performance Max it is not the campaign id, so it never counts there.

TikTok

TikTok campaigns are matched on the campaign only. In TikTok Ads Manager, add this to the ad's URL parameters. TikTok replaces __CAMPAIGN_ID__ and __CAMPAIGN_NAME__ with the campaign's id and name.

utm_source=tiktok&utm_medium=paid_social&utm_campaign=__CAMPAIGN_NAME__&utm_id=__CAMPAIGN_ID__

Put the campaign id in utm_id, not in a campaign_id parameter: AxiTrace reads campaign_id as a Meta campaign id, so a TikTok campaign id there is never matched.

TikTok also offers __AID__ (ad group id) and __CID__ (creative id). AxiTrace does not read an ad group or ad level for TikTok, so you do not need them for AxiTrace.

Microsoft Ads

In Microsoft Advertising, add this to the Final URL suffix of the account or campaign. Microsoft replaces {CampaignId}, {AdGroupId} and {AdId} with the ids of the ad that was clicked.

ms_campaign_id={CampaignId}&ms_adgroup_id={AdGroupId}&ms_ad_id={AdId}

AxiTrace reads these ids from the landing page URL of the visit and matches them against the campaigns, ad groups and ads it imports from your connected Microsoft Advertising account. A utm_source of bing without ids or a click id names the platform with ID confidence inferred.

LinkedIn, Pinterest, Snapchat, Reddit and X

These platforms have no campaign import in AxiTrace yet, so the ids come only from the parameters below. AxiTrace reads them from the landing page URL of the visit. Because there is no campaign list to check them against, the ids are taken as they arrive: an id in the platform's own parameter first, then utm_id. Once a platform's campaigns are imported, an id that is not one of your campaigns is no longer counted as a campaign.

A platform's own id parameters also name the platform when the visit has no click id. Without ids or a click id, a utm_source such as linkedin, pinterest, snapchat, reddit or twitter names the platform with ID confidence inferred.

LinkedIn

LinkedIn does not use placeholders in the URL. Instead, in Campaign Manager add dynamic tracking parameters to the campaign (or the ad account): a parameter named li_campaign_id with the dynamic value Campaign ID, and a parameter named li_creative_id with the dynamic value Creative ID. LinkedIn appends them to the landing page URL as, for example:

li_campaign_id=123456789&li_creative_id=987654321

AxiTrace maps the LinkedIn campaign to the campaign and the creative to the ad; there is no ad set level. LinkedIn does not add dynamic parameters to Conversation Ads and Message Ads; for those, write the ids into the URL yourself.

Pinterest

In Pinterest Ads Manager, add this to the ad's destination URL. Pinterest replaces {campaignid}, {adgroupid} and {adid} with the ids of the Pin that was clicked.

pin_campaign_id={campaignid}&pin_adgroup_id={adgroupid}&pin_ad_id={adid}

Snapchat

In Snapchat Ads Manager, use Build a URL Parameter on the ad, or type the parameters yourself. Snapchat replaces {{campaign.id}}, {{adSet.id}} and {{ad.id}} with the ids of the ad that was clicked.

sc_campaign_id={{campaign.id}}&sc_adsquad_id={{adSet.id}}&sc_ad_id={{ad.id}}

Reddit

Reddit documents {{CAMPAIGN_ID}}, {{ADGROUP_ID}} and {{AD_ID}} for the URL parameters of its catalog ads:

rdt_campaign_id={{CAMPAIGN_ID}}&rdt_adgroup_id={{ADGROUP_ID}}&rdt_ad_id={{AD_ID}}

For other Reddit ad formats, check one live click. If the placeholders are not replaced, write the ids from Reddit Ads Manager into the URL instead. Reddit does not let you change URL parameters after the ad is created, so check them before you publish.

X

We could not confirm a placeholder in X's documentation that fills in campaign, ad group or ad ids, so write the ids from X Ads Manager into each ad's URL yourself:

x_campaign_id=YOUR_CAMPAIGN_ID&x_adgroup_id=YOUR_AD_GROUP_ID&x_ad_id=YOUR_AD_ID

utm_id

utm_id is the standard UTM parameter for a campaign id, and AxiTrace reads it on every platform:

  • Meta, Google Ads and TikTok: the value is used when it is the id of one of your imported campaigns. It comes after the platform's own id parameter.
  • Microsoft Ads, LinkedIn, Pinterest, Snapchat, Reddit and X: the value is taken as the campaign id when the platform's own campaign parameter is missing.

Put only the campaign id in utm_id, never a name or several ids joined together.

Email tools. The same parameter ties a visit to your e-mail campaigns and flows. Put the campaign id in utm_id, or the flow id for a message of an automated flow; AxiTrace keeps it with the visit and a connected e-mail tool (Klaviyo today) matches each visit and order to the exact object, even when two campaigns share a name. A visit with only a utm_campaign name still matches by name. The Klaviyo guide has the full set of recommended values: Recommended UTM settings in Klaviyo.

ID confidence

Each first click and last click of a lead carries an ID confidence: how the platform and the campaign, ad set and ad ids of that click were obtained. From the most to the least certain:

Value Meaning
url_id The ids came from the platform's own URL parameters on this page (for example campaign_id on Meta, campaignid on Google Ads, ms_campaign_id on Microsoft Ads).
click_id The campaign was resolved from the click id: a Google Ads gclid looked up in your connected account.
utm_id The campaign id came from a UTM parameter: utm_id, or an id written into utm_campaign or utm_source.
name The utm_campaign name matched the name of one of your campaigns (see below).
inferred No click id and no ids: the platform was inferred from utm_source only.
none No campaign could be identified: a click id alone, or no ad platform at all (for example a direct or organic visit).

The platform itself is decided in this order: a click id (certain), then the platform's own id parameters, then utm_source (inferred). A click with low confidence is still counted; the value tells you which clicks are worth tagging better.

How campaign names are matched

When a click carries no id that matches, AxiTrace compares the utm_campaign value with the names of your imported campaigns (Meta, Google Ads and TikTok). Both sides are normalized first:

  • lowercased;
  • letters with accents folded to their base letter, so Wyprzedaz matches Wyprzedaż;
  • everything except letters, digits and spaces removed;
  • repeated spaces collapsed and the ends trimmed.

So Summer Sale - 50% OFF! and summer sale 50 off match. Ids are checked before names, so a name that happens to equal another campaign's id never takes that id over. When two campaigns share a normalized name, the one with the most spend wins. If the value is not a name but a campaign id, it is matched as an id (ID confidence utm_id).

Platforms whose campaigns are not imported (Microsoft Ads, LinkedIn, Pinterest, Snapchat, Reddit, X) have no names to compare with, so name matching does not apply to them: tag those ads with the id parameters above.