How to track offline marketing campaigns in Google Analytics

When's the best time to optimise your website for search engines?

Google Analytics is a free tool used by many website owners to track their visitor numbers and traffic from various online sources such as Google Ads, social media and email marketing campaigns. But did you know you can track offline campaigns too?

Providing you’re giving your recipients a trackable URL to follow to your website, you can track how many people visit your website following on offline campaign such as a leaflet drop, direct mailer or trade exhibition. Here’s how!

Decide on your domain

First off, you need to decide how you want to display your links. If you’re printing the URL on a flyer or letter, you need to make the address is simple to type in, not too long and no ambiguous characters such as lower case ‘L’, capital ‘i’ and the number ‘1’ – they can all start looking similar in some fonts.

If you choose to use your existing domain, you can skip this step.

If you decide using a shorter domain would make it easier for people to use, or you want your domain name to reflect the particular campaign, you’ll need to make sure this domain is available and register it with your domain provider (some like 123 Reg, GoDaddy or Cloudnext).

Choose/build your landing page

You may decide that your offline campaign requires a dedicated landing page building on your website. Now’s the time to get this built. If you simply want to send your recipients to your existing website, you just need to choose the most appropriate page on your website to send them to.

We need the URL of either your new landing page or the page on your existing website to start building the trackable links.

Build your trackable links

Using Google UTM tracking variables means you can pass details of your campaign through to your analytics account. UTM tracking variables are simply short bits of information added to the end of your links. They do not affect how the landing page is displayed to the user.

Using a free tool such as UTM.io makes this step really easy.

Google's UTM builder
Source: UTM.io

The website URL is the landing page you’d like to use for the campaign (not the shortened or campaign specific URL, if you’ve registered one).

Campaign Source could be something like “offline” or “mailer” or “tradeshow” – something that you can easily identify as being your campaign.

Campaign Medium might be “letter”, “flyer” or “qr-code” – wherever your URL appears.

Campaign Name would be something you can use to distinguish this from other promotions. You may do several mailers every year, so to differentiate them in analytics, you might give them the names “january2019” or “spring2018”. You might be targeting a different audience or database, so state that in the campaign name.

Use a hyphen (-) to separate words, rather than a space.

Campaign Term and Content are optional but can be useful if you’re creating lots of trackable URLs and need to report on them individually.

Click “Build URL” and you’ll be given your original URL with Google’s tracking variables on the end. Copy and paste this somewhere safe – a spreadsheet or notepad will do.

Redirect your URLs

Now the technical bit. We need to redirect the URL you want to use in your promotion to the URL with the tracking code attached. To do this, we want to create a 301 redirect on your host server.

If you have registered a new domain to do this, you will need to add hosting to this domain first, then use option 1 below.

If you are using your existing website, you will need access to your host server either via FTP or your hosting control panel > File Manager section.

In the root of your domain (example.com/) you may already have a file called .htaccess. This is the file we are going to edit. If you don’t have this file, we will create one using notepad.

Warning – the .htaccess file isn’t something to mess with if you’re not confident editing code. A full stop or space in the wrong place can bring down your website, so edit with caution or seek expert help. If your website is hosted on WordPress, there are 301 redirect plugins that may be able to perform this task for you, we just like to do things the old-fashioned way ?. A WordPress plugin will only work on the URL you are redirecting, so if you have registered a new URL, you would need to install WordPress on there as well.

Let’s say our campaign URL is example.com/mailer2020 – this is what we will publish on our marketing literature.

Our tracking URL is: https://example-domain.co.uk/?utm_source=mailer&utm_medium=letter&utm_campaign=2020

To redirect the campaign URL to the tracking URL, we would add the following line to the .htaccess file on the example.com domain:

Redirect 301 /mailer2020 https://example-domain.co.uk/?utm_source=mailer&utm_medium=letter&utm_campaign=2020

Leave a space after 301 and between the old path and the new URL (before the “https”)

If you’re creating multiple URLs, be sure to add them on a new line.

Save the .htaccess file or upload this to the root directory of the campaign domain.

Test it

To test this works, try typing in the campaign URL to a web browser and seeing if the address changes to the tracking URL in the address bar. After 24 hours or so, you should see this visit appear in the Google Analytics report under Acquisition > Campaigns > All Campaigns.

Leave a Reply

Your email address will not be published. Required fields are marked *