📢 Tatvic is now a global partner of Usercentrics, world’s leading consent management platform

Update to Brian Cliftons Outbound Link Tracking Code

Last Updated:

Services:    

We were working with lot of clients to track the outbound link going out of website using Brian Clifton’s Script. After using it extensively, we found if there are some updates that we can do , it will certainly help our customers and other users of the script to get greater insights on outbound link tracking.

Here are the Quick Updates :

1. From Trackpageview to Trackevent

In the old scripts pagetracker._trackpageview was used as medium to communicate the outbound link name to GA. It’d create an extra page view on the site and would show up in the content report. With the advent of Event tracking and now it being available for Advance segments, we realized that it is worth using event tracker for the code.

2. Time To Click The Link/PDF/Mailto

Brian Clifton had another script to track the page load time. This script measures how much time it takes to load a page for different users and it gets reported via event tracking. We used this same concept to integrate it into outbound link tracking.

We merged two script to create a mash up script so that when user clicks on link, an extra pageview is not generated and tracking happens via event tracking. Also, we added value of time it takes for users to click on specific link from the start of the page. This can give important insights on link placements and change the prominence of placing an external link to understand the user’s pattern of clicking external links. Since, this script works for downloads, mailto links as well it will be interesting to know, time it took for users to click on pdf/download/mailto links.

A normal event tracker is _trackEvent(category, action, optional_label, optional_value)

With the new script what will go into it ?

_trackEvent(“link type”, “Link URL” , “medium”, “time taken by user from page load to click on links”).

You can find new Script here.

Needless to say this though, we are extremely thankful to Brian for making scripts available for free and providing opportunity to update them !

Abhishek Pathak

Abhishek Pathak

Abhishek is a Data Scientist at Tatvic Analytics. With 6 years of experience in data science and Analytics, his daily work revolves around Data Analytics, Computational Linguistics (NLP), building, and developing cloud-based solutions, among others.

Sign up for
our monthly newsletter

This field is for validation purposes and should be left unchanged.

Other Blog

Mobile App UX Design Process
ios app design guidelines
Scroll to Top

Leverage Tatvic's comprehensive approach to 

Enquire Now

This field is for validation purposes and should be left unchanged.

Leverage Tatvic's comprehensive approach to 

Contact Us

Checkbox
This field is for validation purposes and should be left unchanged.