06Tracking
UTM tags and click IDs
Which URL parameters Gauss keeps, what it does with ad click IDs, and how to tag links for newsletters, Telegram and ads.
UTM tags tell Gauss which newsletter, post or ad a visit came from. This page covers which URL parameters the tracker keeps, what happens to ad click IDs, and how to tag links so campaigns don't split apart in reports.
What stays in the page URL
The tracker cleans the page URL (page_location) before sending it. Only these remain:
| Parameter | What the tracker does |
|---|---|
utm_source, utm_medium, utm_campaign, utm_term, utm_content | sends them as is |
gclid, gbraid, wbraid, dclid, yclid, ysclid, fbclid, msclkid, ttclid, li_fat_id | keeps the name, replaces the value with 1 |
All other query parameters and the #hash are removed before sending. For example, this URL
https://shop.example/catalog?utm_source=google&utm_medium=cpc&gclid=Cj0KCQiA&sort=price&session=ab12#topis sent as:
https://shop.example/catalog?utm_source=google&utm_medium=cpc&gclid=1Coming soon. An allowlist of your own parameters in site settings (for example,
qfor site search). For now, the tracker keeps only UTM tags and click IDs.
Click IDs: only the fact of a click
The click ID value never leaves the browser. On the server, gclid=1 becomes an ad click flag (ad_click), and the parameter itself is removed. A visit with this flag goes to the Paid channel even without UTM tags. Gauss data can't be used to match a visit to a specific click in an ad account.
How Gauss uses UTM tags
- UTM tags are saved for the visit. A visit's source is the source of its first event: if someone arrives via a tagged link and views five more pages, all of them belong to that campaign.
- A visit lasts no longer than one day (without cookies there is no longer-lived identifier). If the person comes back tomorrow without UTM tags, that's a new visit with a different source.
- The channel is derived from
utm_mediumandutm_source:cpc,ppc,paid,paidsearch,paid_social,display,cpmmean Paid,emailmeans Email, a social network or messenger inutm_sourcemeans Social. All rules are in Sources and channels.
How to tag links
Newsletter:
https://shop.example/sale?utm_source=newsletter&utm_medium=email&utm_campaign=nov_sale&utm_content=header_buttonTelegram channel post:
https://shop.example/blog/how-to-choose?utm_source=telegram&utm_medium=social&utm_campaign=oct_promoSearch ad:
https://shop.example/lp/promo?utm_source=google&utm_medium=cpc&utm_campaign=coffee_machines&utm_term=espresso+machineThe ad platform adds the click ID to the link itself, so you don't need to.
Case and spelling
The tracker sends UTM values as is and doesn't change their case. To keep one campaign from splitting into several rows (Telegram, telegram, tg), agree on a few rules with your team:
- write all values in lowercase;
- use one source name per platform;
- separate words with
_, no spaces; - don't put recipient data in tags: an email address in
utm_contentis replaced with[redacted](What data is collected).
Ad spend, cost per lead and ROMI
Coming soon. Importing ad spend from CSV and calculating cost per lead and ROMI by campaign.
Spend will be uploaded as a table with these columns: date, utm_source, utm_medium, utm_campaign, spend, currency. Gauss will match it to the UTM tags of visits:
- cost per lead = campaign spend for the period ÷ number of lead conversions from visits with that campaign's UTM tags;
- ROMI = (conversion value − spend) ÷ spend.
For the numbers to add up, utm_source, utm_medium and utm_campaign must match exactly in your links and in the spend table. Conversion value: Conversions and e-commerce.
Checking
Open the page via a tagged link with &gauss_debug=1 at the end: the browser console shows a page_view with the cleaned page_location. Details: Verify your installation.