Back to blog

A complete guide to campaign tracking in your web analytics platform

Analytics Product best practices

Written by

Published March 8, 2017 · Updated November 12, 2020

A complete guide to campaign tracking in your web analytics platform

So, you’ve started running paid or organic marketing campaigns to drive more traffic to your website, or you may have started some online partnerships. Wouldn’t it be great to know exactly which of these brings your website the most traffic? And what about the revenue generated by these channels?

That’s exactly where your web analytics can lend you a hand. Piwik PRO Campaign Tracking is available in all modern platforms, including Google Analytics and Piwik PRO. It is an important part of the Referrers reports that can help you better assess the efficiency of each of your different channels. Here’s how to make the most of it.

But before we begin, let’s consider one very important question:

The shortest answer is that URL tagging can help your analytics software to assess exactly how each individual ad or marketing initiative you’ve launched is performing. And if you spend a lot of time publishing new content on social media then you definitely want to track its performance and impact on your website or business.

By taking a strategic approach to tagging your links now you’ll save a lot of time and hassle in the future, so it’s worth your attention, especially considering that campaign tracking is fairly easy to implement. It can provide you with answers to the following questions:

  1. Where is my traffic coming from?
  2. Why is it coming to me?
  3. Which channels convert best or bring the most revenue?
  4. Is my campaign budgeting bringing the right results, or should optimise my spending?
  5. Am I allocating my time and efforts to the right channels, or should I change my strategy?

So if you want to tap into this knowledge, you need to deploy tags to your links. In order to do this, you first have to choose the right parameters.

Example of a tagged link, ready for some serious campaign tracking in Piwik PRO

Free Comparison of 5 Leading Web Analytics Vendors

Compare 40 Variables of 5 Leading Enterprise-Ready Web Analytics Vendors:

Download FREE Guide

What Campaign Tracking Parameters Can I Choose From?

Both Google Analytics and Piwik PRO let you choose from different types of parameters that can help you tag your links in the most meaningful way possible.
As they are different platforms, they have their own sets of parameters:

  • Google Analytics uses UTM
  • Piwik PRO deploys PK

Despite having different names, both UTM and PK work in a similar way, letting you specify campaign, source, medium, keyword, content and cid.

Remember that if you use Google Analytics, then you need to go for UTM, and Piwik PRO users should add PK. A pick-n-mix approach isn’t possible, so make sure you choose the right type of parameter for your tracking platform.

That said, having so many options doesn’t mean that you have to use them all! Quite the contrary, it’s best to decide on the 2-3 most important parameters that will tell you exactly what you need.

So here they come:

Campaign: pk_campaign / utm_campaign

This obligatory parameter should include the name of the marketing campaign that your link is related to. In general its name should be descriptive and easy to understand by everyone who views the report. For instance, Facebook_Dec_2016 tells you immediately that you’re looking at a campaign related to social media taking place in the last month of 2016.

Source: pk_source / utm_source

This is usually the name of the website sending you traffic, for example: Facebook, Techcrunch, etc. If the traffic comes from a different source, you should use the most descriptive name for this particular referrer, e.g. Newsletter, Google, Bing, Yahoo, Newsletter_2, etc.

Medium: pk_medium / utm_medium

This parameter describes the medium used to send traffic to your website. For example, for the traffic source ‘Facebook’, we can use some of the following: cpc, banner, sponsored_post, sidebar_ad etc. For the traffic source “Google” the medium could be cpc or organic.

Keyword: pk_keyword / utm_keyword

This optional parameter describes the name of the keyword used to drive traffic to your website and is only used for PPC campaigns. It is often used alongside the tag source=google and medium=cpc for AdWords campaigns.

Content: pk_content / utm_content

This parameter is used to differentiate the medium for a particular campaign. It may be useful, for instance, if within one campaign we are using several different banner ads or if we are sending two kinds of emails: an HTML one and a plain text one. For instance, the content parameter could take the following values: banner_1, banner_2, html_copy, text_copy etc.

Choose the Right URL Builder For Your Analytics Platform

Of course, typing that long string of characters is pretty tedious, so most people use URL builders. These tools let you insert the values for each of those parameters, and then they do the magic of stitching them together into a nice and long URL.

Depending on the web analytics platform you use, choose one of the following URL builders:

If you happen to have a a whole link tagged in UTM, but your platform of choice is Piwik PRO, than you will find this converter quite handy. It’s a part of the PRO URL Builder:

UTM Parameter Converter
UTM Parameter Converter

And if you manage a lot of social media links, tools like Hootsuite or Buffer include the option to add custom URL parameters to all of your links.

Going Beyond a URL Builder

Of course, having such a long link can seem daunting at first. If you use Twitter, you’d shrug off the idea of using all your precious 140 characters just to insert a link, right?

Luckily there are URL shorteners, such as,, tiny.url and plenty more tools that let you effortlessly shorten your long links into far more manageable strings of 22 characters. Isn’t that short and sweet?

So let’s say we have a very long link, like this one:

Once shortened, you’ll get a link in this form:

That looks a lot better, doesn’t it? And if you don’t like the random letters and numbers approach, you can use tools that let you create and share short links with a custom domain name for personal or corporate branding. Just to give you an example:

It looks really great when you set it up with your personal or company domain name.

Best Practices for Campaign Tracking

So at this moment you probably already have identified your parameters and got your URL Builder opened. Yet before getting your hands dirty with tagging, it’s important to keep these few simple rules in mind:

Use a naming system that is clear and easy to understand

Use meaningful names for your campaigns and keep the rest of your team updated on the system you have in place. It’s essential that everyone can understand what data is provided in your campaign reports. Having a unified naming convention or policy within your team can be of help too. If all of you agree on and consistently implement naming conventions for tags and campaigns, you’ll never have to worry about your analytics data being skewed.

A word of caution: your readers will see your tags in the URL bar of their browsers, so be easy on them 😉 Avoid words that may cause a stir or repulsion.

Tag every URL you can control that comes to your site

Each time you ask people to click a link, you should be setting up a PK / UTM tag. This includes all your email links, ad links, press articles, blog posts, etc. In this way you can know exactly which of your activities and sources drive the most traffic.

Keep an eye on case-sensitivity

Some say this is the worst part of campaign tracking. It is important to remember that the tag pk_source=adwords will be identified as a different tag from, let’s say, pk_source=Adwords. Our tip is to decide on lower-case, and stop worrying about it once and for all.

Use only the parameters that you really need

There are different pk parameters, but you generally need to use only pk_source / utm_source, pk_medium / utm_medium, and pk_campaign / utm_campaign. Avoid squeezing too many items into your URL.

Let’s be honest, managing UTM /PK tagged links can be a real pain, especially when you have to generate, build and shorten multiple Piwik PRO tracking URLs at the same time. If you and your team deal with multiple content and social media campaigns on a daily basis, having a shared file will support your productivity. A simple spreadsheet with tagged links to all your posts or publications can be a great start.

Things to Avoid in Campaign Tracking

Once you start tagging links and discover the benefits of doing so, you may have trouble stopping! However, there are some cases in which it’s better to refrain from tagging your URLs:

You should never use PK / UTM parameters for internal links on your website. Let’s imagine you publish a new post on your company’s blog, then share it on social media, and then one of your followers clicks on the URL and arrives at your blog. When they are done reading, they may use one of the links and go to your home page. If this link uses source=blog you will lose the precious piece of information telling you that the user came from social media. Instead, your report will assign that visit to the blog.

Not paying enough attention to internal linking can cause quite a lot of havoc with your analytics data accuracy – to learn more, check out this post.

Piwik PRO and other analytics tools let you know if a visitor comes to your website via organic search. It could tell you which keywords were used to find your website (even though Google itself does not send the keywords anymore). However, PK parameters override this information, so it is better if you don’t tag your SEO campaigns.

Natural Referrers

As your brand awareness increases, there will be more and more blogs and websites writing about your company. If this is the case, then you’re doing a great job! However, your referrers might link to your website as a part of a blog post. This is fine if the links they use to direct visitors to your site don’t have PK or UTM tracking, as the Referrer information is actually quite useful and contains the URL of the page that brought you the traffic. Such visits will be part of the referral medium. It is a measurement of the overall awareness of our website.

Where can I find my campaign tracking info?

If you implement tagged links in the right way and steer away from the no-nos, then your analytics platform will sort your incoming traffic accordingly.

If you use Google Analytics then the UTM parameters will form a part of your Acquisitions report, so pay attention to the following places:

  • Acquisition > All Traffic > Source/Medium
  • Acquisition > Campaigns > All Campaign

In Piwik PRO your campaign data will be available in the Campaigns report.

Piwik PRO Dashboard

If you use social media shorteners such as or, you can track your links performance in related platforms.


When done right, campaign tracking can be a truly insightful element of your referrals reports. Having a good system of URL tags in place can give you valuable insights into your campaign’s performance. With precise information on where your traffic comes from, you can then segment your visitors and get even more actionable insights.

On the other hand, when done carelessly, URL tagging can cause some real havoc with your data accuracy. Make sure you stick to the do’s and don’ts outlined above and you’ll be on the safe side. Happy tracking!

Free Comparison of 5 Leading Web Analytics Vendors

Compare 40 Variables of 5 Leading Enterprise-Ready Web Analytics Vendors:

Download FREE Guide


Ewa Bałazińska

See more posts by this author

Core – a new plan for Piwik PRO Analytics Suite

Privacy-compliant analytics, built-in consent management and EU hosting. For free.

Sign up for free

Free Comparison of 5 Most Popular Web Analytics Vendors
Upcoming live webinar

February 1, 2022

Online analytics in 2022: How to collect valuable data and stay privacy-compliant?

Find out how to strike the right balance between meaningful data collection and privacy compliance. Learn which tracking methods work best in particular data privacy jurisdictions. Get all your questions answered during the Q&A session.

Sign up for this webinar