Use tracking parameters

Accurately attribute traffic sources and avoid Direct/None data by using URL parameters like ?ref= or UTM tags for clearer marketing insights.

Get better analytics with URL tracking parameters

Accurately attribute traffic sources and avoid Direct/None data by using URL parameters like ?ref= or UTM tags for clearer marketing insights.

https://yourwebsite.com?via=affiliate

statiz reads the landing URL once per session and records via as the traffic source.

List of parameters statiz automatically picks up:

refsourceviautm_sourceutm_mediumutm_campaignutm_termutm_content

When someone visits your website with a URL like yourwebsite.com?via=affiliate, statiz will automatically pick up the via parameter and record it as the referral source.

Campaign tab

?via=affiliate1

Start simple: Campaign tracking

The easiest way to see where traffic and revenue originate is by using the ref parameter. For example, if you share a link to your site on X, you can add ?ref=twitter to the end of the URL:

https://yourwebsite.com?ref=twitter

When someone clicks this link, statiz will record twitter as the campaign.

What you'll see in statiz:

  • In your Campaign tab, ?ref=twitter will appear as a campaign row.
  • You can see how many visitors, pageviews and conversions came from links tagged with ?ref=twitter.
  • If you've connected a payment provider, you'll also see the revenue attributed to the traffic from those links.

Other simple parameters statiz automatically picks up:

  • source — similar to ref, can be used to name the traffic source (e.g. ?source=google).
  • via — useful if your link is shared by another platform or publication (e.g. ?via=tech-news-digest).

Go deeper: Tracking campaigns with UTM parameters

For more detailed campaign tracking, especially for paid ads or complex marketing efforts, you can use UTM parameters. These are a standardized set of parameters that provide richer information.

statiz automatically tracks the following UTM parameters:

  • utm_source — identifies the advertiser, site, publication, etc. that is sending traffic to your property (e.g. google, newsletter42, facebook).
  • utm_medium — the advertising or marketing medium (e.g. cpc, banner, email_newsletter).
  • utm_campaign — the individual campaign name, slogan, promo code, etc. for a product (e.g. summer_sale, product_launch_q3).
  • utm_term — identifies paid search keywords. If you're manually tagging paid keyword campaigns, use utm_term to specify the keyword.
  • utm_content — used to differentiate similar content, or links within the same ad. For example, if you have two call-to-action links within the same email message, use utm_content with different values for each so you can tell which version is more effective.

Example of a UTM-tagged URL:

https://yourwebsite.com?utm_source=facebook&utm_medium=cpc&utm_campaign=spring_promo&utm_content=video_ad

What you'll see in statiz:

  • Detailed breakdowns in your Campaign tab — every utm_source + utm_medium + utm_campaign combination is a row, grouped by source.
  • Clearer attribution of signups, sales, and other goals to specific marketing activities.
  • Better understanding of your advertising ROI.

Best practices for URL parameters

  • Track all important links: use parameters on links from email campaigns, social media posts, advertisements, and even internal links if you want to track specific promotions within your site.
  • Use a URL builder for UTMs: for UTM parameters, tools like Google's Campaign URL Builder can help you create properly formatted and consistent URLs.

Set up campaigns with AI

You don't have to hunt down every link by hand. Copy the prompt below and paste it into an AI coding agent that can edit your website's code — it applies every rule from this page to your outbound links for you.

1I want to set up campaign tracking for statiz analytics, which is already installed on this site. statiz automatically picks up these URL parameters from a landing URL, once per session (first touch):23- ?ref=<name>                      simple campaign, shows as "?ref=<name>" in the Campaign tab4- ?source=<name> and ?via=<name>   same, alternative parameter names5- utm_source, utm_medium, utm_campaign, utm_term, utm_content   full UTM campaigns67Apply campaign tagging to this website's outbound links:891. Everywhere this site is linked from the outside — social profiles and posts, email signatures, newsletters, directories, Product Hunt, marketplaces — add a simple param: https://yourwebsite.com/?ref=twitter, ?ref=linkedin, ?ref=newsletter — one consistent lowercase name per platform.102. Newsletter / email CTAs that land on the site: full UTM tags, e.g. https://yourwebsite.com/?utm_source=newsletter&utm_medium=email&utm_campaign=<issue-name>113. Paid / promotional campaign links: ?utm_source=<platform>&utm_medium=cpc&utm_campaign=<name> — add utm_content when two links in the same campaign need to be told apart.124. Do NOT tag internal same-site navigation links — statiz ignores self-referrals and captures the source only at session entry.135. Tag share / invite / widget links that point back at the site (?ref=share, ?ref=invite).1415Rules: lowercase values, use - or _ instead of spaces, one canonical name per platform, never stack two tagging schemes on one link. Replace yourwebsite.com with this site's real domain. When done, list every file you changed and the exact tagged URLs you added.

After deploying the tagged links, open one in an incognito window and check your statiz dashboard — the campaign appears in the Campaign tab within seconds.