How to track hash URL, PDF download and Click on tabs?

track-adwords-landing-pageAfter the setup Adwords, 90% conversion depends on your landing page. So it requires to tracking the navigation of users and understand the user behaviour corresponding to landing page.  Using Google analytics, we can easily track the user behaviour but for deep analytics it requires to set-up some code in adwords landing pages. Here I discuss traditional way of tracking for hash URL, PDF download and Clicks.

Tracking the Hash URL:

Just update your universal analytics code, replace by following code:

ga(‘create’, ‘UA-22584058-1’, ‘auto’);

ga(‘send’, ‘pageview’);

to

ga(‘create’, ‘UA-22584058-1’, {‘allowAnchor’: true});

ga(‘send’, ‘pageview’, { ‘page’: location.pathname + location.search + location.hash});

After setup this code you can easily track the hash URL in your analytics Like this:

hash-url-tracking

Track the PDF Down load:

For track the any event like PDF download Just add event click code in at hyperlink:

<a href=”http://Your_link” onclick =”ga(‘send’, ‘event’, ‘PDF’, ‘Download’, ‘Event_name’);” >Download </a>

After ad this code you can check in real time about how much user has download the PDFs.

event-tracking

Track the tabs (see Virtual Page-views)

website-tabs-tarck

Sometimes we see that some single page websites does not create any hash URL in situation you can track the tab navigation by using following code.

onclick=”ga(‘send’, ‘pageview’, { ‘page’: ‘/page-name/’});

Add above code with your tab URL Like this:

<a href=”url ” onclick=”ga(‘send’, ‘pageview’, { ‘page’: ‘/page-name/’});” >Tab 1</a>

After setup you can see real time navigation status very easily.

tabs-tracking




Leave a Comment

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

Scroll to Top