How can I track referrals from offline materials using Google Analytics?

How can I track referrals from offline materials using Google Analytics? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the How can I track referrals from offline materials using Google Analytics? error on your web browser. Problem :


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?


Solution :

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.



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.


We hope that this article has helped you resolve the google-analytics, redirects, marketing error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=