Campaign tracking
When tracking a paid, social or email campaign it is best to tag links with parameters that allow website analytics tools to better report on how the campaign performed. When you do this the URL will look like this: https://www.example.com/?utm_source=summer-mailer&utm_medium=email&utm_campaign=summer-sale
You can set up your link parameters using this tool: Campaign URL Builder
From Google’s help page, the essential parameters are utm_source
, utm_medium
and utm_campaign
: URL builders: Collect campaign data with custom URLs
utm_source
- Referrer, for example: google, newsletter, billboard
utm_medium
- Marketing medium, for example: cpc, banner, email
utm_campaign
- Product, slogan, promo code, for example: spring_sale
utm_medium
parameter, anything which is paid-for (including paid advertising on social media) you should set the value to 'paid'. For non-paid social media links set the value to 'social'.We also recommend adding the parameters to any short or ‘vanity’ redirects. For our sites that means adding a redirect from a friendly URL that can be included on something like a print or TV advert (for example, mygov.scot/renters
) which then gets redirected in the back-end of our CMS to a URL which has the tracking code attached (for example, https://www.mygov.scot/private-rental-rights?utm_source=shorturl&utm_medium=cpc&utm_campaign=renters_rights
).
utm_source
in the parameter overwrites the referring site source URL and so vanity URLs are best for print/TV where there is no better way to track.Feedback, help or support
If you need any help or want to give any feedback you can e-mail us at: designsystem@gov.scot