Skip to main content
UTM parameters tell Dema where a visit came from and which campaign, ad set and ad it belongs to. Copy your platform’s template into your ads, then map the incoming traffic to channels.

Recommended setup

Copy-ready templates for each ad platform

Which parameters Dema reads

How Dema finds the campaign, ad set and ad in a URL

Create UTM mapping

Map tagged traffic to channel groups and channels

What is UTM?

UTM (Urchin Tracking Module) parameters are tags added to the end of a URL. A clear and consistent setup lets you:
  • Attribute traffic and marketing spend to the right source.
  • Measure the performance of each campaign, ad set and ad.
  • Turn that data into insights to optimize your marketing.

Which parameters Dema reads

Dema resolves a campaign, an ad set and an ad from the landing page URL. For each of the three it takes the first parameter that is present, in this order: Parameter names are not case sensitive. utm_source and utm_medium are always read as-is, because channel mappings are built on them.
The dema_* parameters let you keep utm_campaign, utm_term and utm_content for your own naming while still handing Dema the platform IDs. When both are present, the dema_* parameter wins.

Every template below has two parts, and only one of them has to be copied exactly.
utm_source and utm_medium are your choice. Dema doesn’t require specific values: you link them to a channel yourself in UTM mapping, so meta and paid_social below are only examples. If you already tag a platform, keep your values. Just use the same ones on every campaign, because a variant such as fb next to meta shows up as unmapped traffic until you map it too.
Copy the dema_id, dema_adsetid and dema_adid parts exactly. They’re macros the platform fills in with its own IDs, and they’re what connects each visit to the platform’s spend and creatives. Never replace a macro with a fixed value: a fixed ID puts every campaign or ad under the same one.
Not every platform has a macro for every level. Where it doesn’t, the template leaves that level out: Open your platform below for where to add the template and what to look out for.
Meta sets URL parameters per ad, in the URL parameters field of the ad’s tracking settings. Paste only the parameters, not a full link with your domain.Changing an existing ad can send it back into the learning phase. You don’t need to update running campaigns just for Dema: add the template to new campaigns and ads, and to existing ones whenever you edit them anyway.
Use the macros exactly as written. Variants such as {{campaign_name}} aren’t Meta macros and arrive as plain text.
Add the template once as the Final URL suffix in Admin → Account settings → Tracking. It then applies to every campaign, including new ones.A suffix set on a campaign, ad group, ad or sitelink overrides the account’s. Remove those, or add dema_id={campaignid} to them too. Google’s auto-tagging (gclid) alone doesn’t tell Dema which campaign a click came from, so keep the suffix even with auto-tagging on.
Add the template to the URL parameters of each ad’s destination URL.
If __CAMPAIGN_ID__ or another macro arrives as plain text, TikTok isn’t filling it in for that ad. Check that ad’s URL parameters.
Add the template once as the Final URL suffix at account level, so every campaign inherits it. As in Google Ads, a suffix set on a campaign, ad group, ad or keyword overrides the account’s, so remove those or add the dema_* parameters to them too.
In Performance Max campaigns, {AdGroupId} returns the asset group ID.
Add the template as the tracking parameters in your ad account settings. Parameters set on individual ads take priority over the account’s, so check that existing ads don’t carry their own.
Add the template to the URL parameters of each ad’s website link.
Add the template in Ads Manager’s account tracking settings, so every campaign inherits it. Parameters set on a campaign, ad group or ad override the account’s for the same key, so make sure no lower level sets different ones.
Any source works except chatgpt.com. ChatGPT already adds utm_source=chatgpt.com to links in its organic answers, so ads tagged the same way can’t be told apart from organic AI traffic in your channel mapping.
Awin adds the parameters to your links for you. Send the exact string below to your Awin contact and ask them to apply it to your programme.
Awin replaces !!!affid!!! with the publisher’s numeric ID on every click. That’s the same ID the Awin integration imports spend under, so Dema can connect each publisher’s traffic to its commission.
Dema has no connector for these networks, so their spend is imported with Google Sheets. Tag the links with the publisher ID, and put the same ID in the sheet’s campaignId column and the publisher’s name in campaign. Dema can then connect each publisher’s traffic to its spend.
Replace adtraction with the network’s name, for example tradedoubler or cj, and {publisher_id} with the network’s own placeholder for the publisher ID. Affiliate networks have no ad set or ad level, so dema_id is the only ID the template needs.
Any channel you want to see separately needs at least a stable utm_source and utm_medium, for example:
Traffic that arrives without UTM parameters is attributed from its referrer instead. That still tells you where the visit came from, but it carries no campaign, ad set or ad detail.
After a change, click one of your ads and look at the landing page URL. Each dema_* parameter should show an ID, not the macro itself.

Need help?

Contact support

Email us at support@dema.ai for further assistance

Fundamentals: Tracking

How sessions, referrals and channels work