3

My client is about to issue a bundle of offline materials (leaflets, posters, etc...) for distribution to various places for PR and marketing purposes. They've asked us to create a number of special URLs that all go to the homepage of their site, through which they can identify the place where the poster was hung / leaflet handed out as the referrer. For example, different leaflets and posters might have different URLs as below:

www.example.com/partner1
www.example.com/partner2

We use Joomla as our CMS, and it's fairly trivial to use its 'Redirect Manager' to alias these special URLs to the home page so that they don't result in 404 errors.

However, I'd also like to intelligently track these URLs. Of course, I could add the standard <code>utm</code> Google Analytics tracking parameters onto the end of the friendly URLs, but this wouldn't be very friendly (www.example.com/partner1?utm_source=posterCampaign&utm_medium=....). But I would like them to flag in Google Analytics as a special type of referral.

What would be best practice in a scenario like this, other than just filtering in the Google Analytics dashboard on pathName or some such?

3

If you use Google Tag Manager then you can capture the value of the URL fragment and then match it with your Lookup Table macro. This is a much more efficient way of doing this.

1) Create a new Macro (Macro Type: URL -> Component Type: Fragment)

2) Create another Macro (Macro Type: Lookup Table)

a) enter all of your items such as location1, location2, bar5

b) use the macro from step one to match 'When {{macro1name}} equals'

3) Setup a new dimension in Google Analytics

4) Go to your Pageviews tag in GTM and under Custom Dimensions add your dimension index and the second micro.

1

Is it possible to hide the utm tags behind a vanity short URL?

In other words, the printed/offline material would have a URL like:

ex.ly/offer1

ex.ly/offer2

Making it easier to remember/type and able to expand out to the big ugly URL that gets you the tracking you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.