WebmasterID logoWebmasterID
UTM tracking

Affiliate campaign tracking with UTM

Affiliate programs measure cleanly when each affiliate has a distinct, stable label. This page shows how to use a per-affiliate utm_source or utm_content for attribution, and why an affiliate's identity must be an opaque code rather than personal data in a public URL.

Verified against primary sources

Per-affiliate labelling

Give the program one medium and distinguish affiliates with a stable, opaque per-affiliate value. Many programs use utm_source for the affiliate, or keep one source and vary utm_content:

Keep the payout data out of the URL

The UTM is for attributing traffic, not for carrying the affiliate's identity or commission terms. Putting an email, real name, or guessable sequential ID in the link exposes personal data in logs and invites enumeration or fabricated referrals.

Use an opaque code that your backend privately maps to the affiliate, and reconcile commissions server-side against that mapping. Keep the public UTM to a generic, non-identifying label, and make sure any affiliate short link redirects to a destination that still carries it.

How it appears in analytics and logs

A visit with utm_medium=affiliate and a per-affiliate label tells you which affiliate drove it, letting you compare partners within one program. The UTM is for traffic attribution, not for the payout record itself.

Diagnostic use case

Give each affiliate a distinct, stable label so you can attribute and compare affiliates from the same program, while crediting the sale through your own backend.

What WebmasterID can help detect

WebmasterID reads utm_medium=affiliate and the per-affiliate label at ingest and attributes the visit to that affiliate, so program traffic is measurable per partner without exposing who they are.

Common mistakes

Privacy and accuracy notes

Use an opaque affiliate code or brand slug, never the affiliate's email, name, or bank details. The code is public in the URL and logs; keep payout-sensitive data behind your backend, not in the link.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.