Facebook Dynamic UTM Tagging, Nomenclature & Examples


UTM is an abbreviation for Urchin Tracking Module. The naming can be considered legacy as Urchin was aquired by Google in 2005; UTM tagging, however, remains the industry standard of tracking parameters in most web analytics suites and advertising platforms.

Short history of UTM tagging
Dynamic UTM tagging has been a part of AdWords for a long time and Google recommends this over static markup. Dynamic tagging entails that variables such as campaign name, adset name, ad name, bid type, etc. are inserted automatically instead of being statically coded into ad URL’s.

Such url’s can be recognized by ?gclid= prefix followed by a long string of dynamically generated characters. Facebook adds a similiar string with account setup for attribution modelling as part of Facebook Analytics.

Algorithmic matching of, for instance, more than 1000 campaigns with each 1000 ad groups with each 1000 ads makes this a very sound approach (never send a man to do a machine’s job!).

If the naming convetion/tagging is consistent, the number of campaigns, ad groups & ads could be infinite without causing a higher (human) work-load.

Also see: Optimering af Google Grants-konto

The five most common UTM parameters (standardized & popularized by Google Analytics)

  • Source, the referrer of the visitsn (e.g The Guardian, Facebook, Instagram)
  • Medium, the medium (.e. CPC, CPM, organic, referral)
  • Campaign, the name of a given campaign (Christmas, July, retargeting, always on)
  • Term, most commonly used for keywords in search ads or identifying audience groups (donation, brand name, men, 30-35)
  • Content, most commonly used for identifying content in ads (photo, video, canvas)

Omnichannel portability & anti-tracking initiatives
In favour of manual tagging, or semi-manual tagging, is tagging portability between systems. Google Analytics can interpret Adwords’ dynamic tags, but Facebook Analytics cannot; at least, I’ve not been able to make such a setup work. UTM parameters are a great solution in a time where cookie based targeting sees more and more restrictions, e.g. Do Not Track & Apples” Tracking Prevention initiative to ensure privacy in a post-Cambridge Analytica time.

Omnichannel remarketing
Standard UTM parameters, if they’re expressed into clear text in urls, can be read across platforms. Thus, it’s possible to create targeting or analysis nomenclatures that permit targeting based on information that’s normally only available to one system (e.g. Facebook) for use on another platform (e.g. Google, Linkedin, Twitter, Portrait, Adobe Campaign or Agilic) or display advertising across of thousands of platform when bought through RtB platforms that offer simple URL matches (which all do). A walk-through of such a setup will have to wait to a dedicated blog post.

Facebook dynamic tagging
I’m unsure as to when Facebook implemented and made publicly available their dynamic tagging solution. The earliest mentions I can find on blogs is around February 2018. Facebook’s official guide can be found here About URL parameters. It’s a good starting point.

I can llowing two Linkedin Pulse posts  How to get Auto UTM tagging in your Facebook Ads campaigns? and Use Dynamic Facebook URL Parameters to tag your campaigns (UTM)

The variables supported are:

One-variable example – encoding and decoding city names
A concrete example from a campaign we’re launching tomorrow:


‘&’ marks the string as a supplement/suffix to the exising URL including its manually added parameters ‘utm_City’ declares the variable name. ‘{{adset.name}}’ contains the variable (‘adset.name’) which will be populated automatically by Facebook based on the campaign’s adsets (in this campaign, we’re using the adset name to identify 15 city groupings.

The ‘adset.name’ variables are not dynamically encoded, but manually setup in a comples matrix in Ads Manager.

Ensuring variable consistency when editing campagins & ad sets

It’s not an uncommon practice to change campaign and/or ad set names — I do this regularly especially when cloning existing/old including their adsets in order to save time. How does this affect dynamic tagging?

According to Facebook:

Name-based URL parameters will be set to the names provided for your campaign, ad set or ad when they are first published. We’ll use those names as the parameter values during replacement. You can still edit your URL and campaign, ad set or ad names, but the parameters will always refer to the original names.

Two to two variables & two to one variables

It’s possible to encode all Facebook variables (i.e. ad_id={{ad.id}}; adset_id;{adset.id}}; campaign_id={{campaign.id}}; ad_name={{ad.name}}; adset_name={{adset.name}}; campaign_name={{campaign.name}} into one UTM tag. Conversely, it’s also possible to separate each Facebook variable into single UTM tags.


Two Facebook variables in two UTM variables:

Two Facebook variables in one UTM variable:


Bag om en lead ads-kampagne på Faebook | Beskyt krigens børn

Kontekst for: Safe Schools | Beskyt krigens børn-kampagnen på Facebook
I Folkekirkens Nødhjælp kører vi for tiden en underskriftskampagne. Kampagnefokus er toleddet: 1) Situationen i Syrien; 2) Børns vilkår i krigsramte områder generelt betragtet.

Kontekstmæssigt er kampagnen centreret omkring Safe Schools Declaration.

Kampagnens KPI’er er af gode grunde ikke offentligt tilgængelige. Men målsætningen har været (for os) et klassisk mix af branding, leadindsamling, donoraktivering & re-aktivering kombineret med et fokuseret, målbart eksperiment/forsøg med Facebooks lead ads-annonceringsformat & -model.

To sideløbende spor målgruppemæssigt
I kampagneperioden køres to sideløbende spor: 1) engagementskabende (primært målrettet followerbasen, 221.000 stor; 2) konverterende spor (segmentstørrelse omkring 1,200.000, primært kvinder, primært bosiddende i landets større byer, primært gift eller forældre).

Opslagstyper: Lead ads på Facebook
Opslag 1: Klassisk klikopslag (billede i 1200×628). Klikbart område er 1) billedet; 2) kliktekst (Beskyt krigens børn. Klik for at skrive under her).

Skærmdump af annoncen:

Annoncen performer over gennemsnit — trods der mangler de klassiske NGO-parametre, særligt manglende billede af de mennesker, bomber rammer (her ville det typisk være et barn).

Læs mere Bag om en lead ads-kampagne på Faebook | Beskyt krigens børn