DocsHow to use UTM parameters for tracking

How to use UTM parameters for tracking

Learn how to accurately attribute traffic sources using standard UTM tags and ViaMetric's smart parameter detection.

ViaMetric automatically captures standard UTM parameters from your URLs to help you understand exactly where your traffic is coming from.

Supported Parameters

We support all standard Google Analytics-style UTM tags, plus a few convenient shortcuts.

ParameterMeaningExample
utm_sourceThe specific site or platform sending traffic.google, newsletter, twitter.com
utm_mediumThe marketing medium or channel.cpc, email, social
utm_campaignThe specific campaign name.spring_sale, launch_v2
utm_termKeywords for paid search.running+shoes
utm_contentDifferentiating ads or links.logo_link, cta_button

Special Shortcuts

ViaMetric also listens for these shorthand parameters, which are often used by creators and indie hackers:

  • ?ref=... (Mapped to Source)
  • ?via=... (Mapped to Source, and sets Medium to social)
  • ?source=... (Mapped to Source)

Auto-Tagging

We automatically detect and categorize traffic from major ad networks if specific CLICK IDs are present:

  • gclid → Google Ads
  • fbclid → Facebook Ads
  • ttclid → TikTok Ads
  • li_fat_id → LinkedIn Ads

How to Build a Tracking URL

To track a campaign, simply append the parameters to the end of your link using a ?.

Example:

https://yoursite.com/?utm_source=twitter&utm_medium=social&utm_campaign=launch_post

Using a Shortcut:

https://yoursite.com/?ref=producthunt

Best Practices

  1. Be Consistent: Stick to lowercase (e.g., email instead of Email) to prevent split data.
  2. Don't Tag Internal Links: Never use UTMs for links between pages on your own website. This restarts the session and confuses the data.
  3. Use utm_content for A/B Testing: tracking different versions of a newsletter link or ad copy.

FAQ

Q: Do I need to configure anything in ViaMetric? No. As long as the script is installed, we automatically parse these parameters and populate your "Sources" and "Campaigns" reports.

Q: What happens if I use both ref and utm_source? This is rare, but if both are present, utm_source takes priority as the standard implementation.