Tagging URLs with UTMs (Google Analytics)

Using parameters to tag campaigns on Google Analytics-the famous UTMs-is something that practically every web working with this tool does. The problem is that in many cases this is not done correctly, be it for not knowing how it works or due to no planning for using it. This article explains how they work and lays out some general rules to follow in order to avoid the most common mistakes.

Although most times people tag manually, Google Analytics allows using an ID to make tracking campaigns easier. This configuration has gone unnoticed many times despite it being the best way to avoid incoherences during tagging. And implementing it is actually very simple:

  1. Define an alphanumeric value (letters and numbers) for the campaign ID and assign it to the parameter url utm_id.
  2. Enable campaign data under the option “Data import” from the Google Analytics location that we want.Ejemplo configuración utm_id
  3. Make a CSV file with the equivalences between the ID used and the corresponding values. For this, the first line of the file must contain a heading with the names of the dimensions each column refers to. For example:


1234IR,blog newsletter,email

As we can see, the value used for the parameter utm_id is indicated under the column “ga:campaignCode”. The full example of implementation of this tagging is accessible via Google Analytics help.

If there is no possibility to tag with ID, you can also do it manually using at least three of the variables-the system allows up to five, but three are compulsory. These are:

  • Utm_source: Compulsory field so that Google Analytics recognises correctly the tagging. It is used to define the source where the visit comes from, so its value has to be the web name where the link is going to be hosted.
  • Utm_medium: This variable defines the medium where the action to measure belongs to, for example “retargeting”, “cpc” or “email”. It is also compulsory.
  • Utm_content: One of the great unknown. It has to be used to distinguish between different links that can exist in the same page, like for example two different banners or several links within the content. The values could thus be “banner heading”, “link menu” or “banner 350×350”. These are not compulsory.
  • Utm_term: The other “unknown” is used especially for measuring campaigns of sponsored searches. Its value must be the term used for the search. It was very popular with AdWords campaign before Google made possible linking Google Analytics and AdWords. It is not compulsory for all the taggings.
  • Utm_campaign: The last one. It is compulsory to include them. It has to include the name of the campaign to be measured, so some values could for example be: “summer newsletter” or “promotion 3×2”.

When we are clear about what these parameters mean, let’s see what we need to take into account to make them work the way we want.

  1. Define a procedure to assign values to different variables. This is crucial when different people are tagging URLs, and it is highly recommendable even if there is only one person doing it: when you define it manually, if the URLs are not unified following the same criteria, we risk blocking or making difficult to view reports of the campaigns.
    Examples of rules to set for this could be:

    • Write all the values using lower case.
    • Not separating words with spaces.
  2. Use Google’s URL builder. Although you can tag URLs manually and easily, this URL builder can prevent us from making mistakes when building a URL, e.g. assigning wrong values to the different variables-because it tells you what they refer to-or building the URL wrongly.
  3. Filter values of the parameters in Google Analytics to avoid duplicates. If you for example decide that all the values will go in lower case, you can create a filter to force the data from the UTM parameters to be converted into lower case.
  4. Do not use any of these to measure how many times an internal link of the web is followed. If you do, data from Google Analytics will be altered because people following an internal link with a tag will count as a new visit.
Rate this post
The following two tabs change content below.

Internet República

Somos una agencia de marketing digital especializada en SEO (posicionamiento en buscadores), gestión de reputación online (ORM), marketing de contenidos y Social Media. Ayudamos a darle visibilidad a tu marca en internet para que consigas, no solo atraer a tus potenciales clientes, sino también fidelizarlos.

Latest posts by Internet República (see all)