Manual link tagging with UTM tags


It is not always possible to detect a referrer, and some traffic will be classified as "direct" traffic. To minimize the amount of traffic classified as "direct," you can add special query parameters to your links.

For example, when you post a link on social media or send someone a link via email or similar means. If the link doesn't contain any special query parameters (UTM), it will fall within the "direct" category. However, if you add ?ref=<value> to your link, Galytics will use the value as the referrer source.

Supported query parameters

  • ref
  • utm_source
  • utm_medium
  • utm_campaign

{info} Referrer and UTM tags are only registered when starting a new session on your site. Therefore, you may not see all your own visits if you test several different UTM-tagged links simultaneously.

Example usages

If you send out newsletters and link to your site with yourwebsite.com, anyone who clicks that link will fall into the "direct" category.

But if you instead link to yourwebsite.com?ref=newsletter, anyone who clicks on that link will show up with newsletter as the referrer. This will allow you to see how many people click the link in your newsletter.

You can track your links in more detail by using UTM parameters.

yourwebsite.com?utm_source=newsletter&utm_medium=email&utm_campaign=Spring+Promo

If anyone clicks on this link, you will be able to track exactly how many clicks are generated by that specific email promo in the Galytics dashboard.

{info} Best Practice: It is a good practice to tag your links anywhere the referrer header is not sent, such as in emails, newsletters, chat, messaging applications, social media, paid advertising campaigns, and more.

When a query parameter is present in the link, it takes priority. When someone lands on your website without the special query parameter defined, we fall back to the referrer header.

Types of UTM parameters

UTM parameters consist of:

UTM Source

utm_source: Identifies the specific origin of your traffic. Are visitors coming from Google, Facebook, or a newsletter?

UTM Medium

utm_medium: Indicates the general category or type of traffic source, such as email, social media, or paid advertising.

UTM Campaign

utm_campaign: Allows you to group all content from one campaign into one set of analytics. For example, "Spring+Campaign+2021." This parameter is the most flexible and can include launches, sales, features, specific topics, etc.

Avoiding Spaces in UTM Tags

You cannot include spaces in UTM tags. Instead of utm_medium=social-paid, use utm_medium=social+paid or utm_medium=social%20paid.

Galytics converts plus signs into spaces

We recommend using a plus sign or %20 as Galytics will automatically convert those into spaces. For instance, if you use social+paid or social%20paid in your links, it will be displayed as social paid in your Galytics dashboard.