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.Recommended UTM setup for Dema
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.
Open your platform below for where to add the template and what to look out for.
Meta
Meta
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.Google
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.TikTok
TikTok
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.Microsoft Advertising (Bing)
Microsoft Advertising (Bing)
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 In Performance Max campaigns,
dema_* parameters to them too.{AdGroupId} returns the asset group ID.Pinterest
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.
Snapchat
Snapchat
Add the template to the URL parameters of each ad’s website link.
ChatGPT (OpenAI Ads)
ChatGPT (OpenAI Ads)
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
Awin
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.Other affiliate networks
Other affiliate networks
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 Replace
campaignId column and the publisher’s name in campaign. Dema can then connect each publisher’s traffic to its spend.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.Email, CRM and other channels
Email, CRM and other channels
Any channel you want to see separately needs at least a stable 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.
utm_source and utm_medium, for example:Need help?
Contact support
Email us at support@dema.ai for further assistance
Fundamentals: Tracking
How sessions, referrals and channels work

