UTM tracking
How Zanfia captures UTM parameters from your links, remembers them until the purchase, and passes them to analytics, orders, thank-you redirects, webhooks and workflow e-mails.
UTM parameters are the labels you add to a link so you can tell campaigns apart, for example ?utm_source=facebook&utm_medium=cpc&utm_campaign=summer-sale. Zanfia reads them on its own; there is nothing to switch on. This article explains where they are captured and where you get them back.
Which parameters are captured
| Parameter | Meaning | Example |
|---|---|---|
utm_source | Where the traffic comes from | facebook |
utm_medium | The kind of traffic | cpc |
utm_campaign | The campaign name | summer-launch |
utm_term | The keyword | online-course |
utm_content | The ad or content variant | blue-button |
Click identifiers added by ad platforms (fbclid, gclid, ttclid and similar) and the referring site are captured alongside them.
How the parameters reach the order
- On the checkout link. A checkout opened with UTM parameters in its address stores them with the checkout session and, after payment, with the order.
- On an earlier page. When a visitor lands on your storefront, a product page or a custom page with UTM parameters and only later clicks through to the checkout, the first visit is remembered in a first-party cookie for 30 days. The checkout uses what is in its own address first, then the most recent campaign visit, then the first one. A later visit without campaign data never overwrites an earlier campaign visit.
- On your own website. Pages outside Zanfia pass the parameters on when they carry the tracking snippet; see Track a website outside Zanfia.
Where you see them
| Place | What is shown |
|---|---|
Analytics → Traffic & conversions → Traffic (/analytics/traffic?view=traffic) | Traffic by source, grouped by Source, Medium, Campaign or Referrer, with visits, purchases and revenue |
| Traffic & conversions → Conversions, session detail | The Source of one checkout session: source, medium, campaign |
Transactions (/orders), order details | A Source line with the campaign, ad and term of the order |
| Transactions, CSV export | Columns for all five UTM values |
| A client's profile in Customers | The source of the client's first contact with you |
Pass them to a custom thank-you page
When a checkout redirects buyers to your own page after payment, Zanfia appends the order's UTM values to that address together with the order data (productName, totalAmount, currency, transactionId and others). Only the parameters that were actually present are added: a purchase from a link without utm_term produces a redirect without utm_term, and an untracked purchase keeps a clean address. Setting up the redirect is described in Customize the thank-you page.
Send them in a webhook
In a webhook's payload, the value list for a field includes UTM source, UTM medium, UTM campaign, UTM term and UTM content. Add a field, give it your own key (for example source) and pick the value. For a purchase without campaign data the field is sent as null. The test send uses sample values. Webhooks are described in Webhooks.
Use them in workflow e-mails
Workflow e-mails accept these variables, inserted from the variable list in the e-mail step:
| Variable | Inserts |
|---|---|
{{utmSource}} | Campaign traffic source, such as facebook |
{{utmMedium}} | Campaign traffic medium, such as cpc |
{{utmCampaign}} | Campaign name |
{{utmTerm}} | Campaign keyword |
{{utmContent}} | Campaign content variant |
When the order has no value for a variable, the e-mail shows nothing in its place, not the raw variable. Workflows are described in Emails sent by workflows.
Good to know
UTM values are campaign data, not personal identifiers, so they are always kept. The click identifiers of ad platforms are different: when a visitor answers your cookie banner without accepting marketing cookies, those identifiers are not stored in the cookie. Keep your UTM naming consistent across campaigns so the Traffic by source table groups them the way you expect.
Was this article helpful?

