How To Track Long Term Impact of Social Referrals in Google Analytics

Social media as a marketing channel offers limited ROI measurability. Unlike search where traffic is usually keen on converting, social traffic to a website has more of an exploratory mindset with a focus on discovering a brand rather than purchasing a solution. What this usually means is that the likelihood of a visitor from social platforms converting during his/her immediate visit to the website is quite low when compared to other marketing channels. The same visitor however could convert at a (much) later date, as & when there is a need for the product or service in question & this makes measuring social ROI difficult for us analytics folks.

Multi-channel funnel (MCF) reporting from Google Analytics has solved this problem to some degree. It stiches together previous sources of website interactions & provides an idea about which channels are assisting conversions. This is great overall but the fact that MCF retrospects interactions only over a period of 30 days means that the long term impact of social media is undervalued.

As a simple workaround for this issue, we have developed the following code customization that can be pasted on all landing pages of your website. The code will tag a user coming from social channels with a visitor-level custom variable (custom variable index is ’1′ in the example below; you will need to change this if you are already using this slot) & track his/her browser for a period of 2 years. If any immediate or subsequent conversions are made by the user, they get recorded within Google Analytics under the custom variables report.

The Code:

 <script type="text/javascript"> var month = new Array(); month[0] = "Jan"; month[1] = "Feb"; month[2] = "Mar"; month[3] = "Apr"; month[4] = "May"; month[5] = "Jun"; month[6] = "Jul"; month[7] = "Aug"; month[8] = "Sep"; month[9] = "Oct"; month[10] = "Nov"; month[11] = "Dec"; var now = new Date(); var curr_date = now.getDate(); var curr_month = now.getMonth(); //Months are zero based var curr_year = now.getFullYear(); now = month[curr_month] + " " + curr_date + " " + curr_year; //alert(now); if (document.referrer.split('/')[2] != location.hostname); { n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: facebook', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: twitter', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: linkedin', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: google plus', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: pinterest', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: twitter', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } n =""); if (n != -1) { //alert(document.referrer.split('/')[2]); _gaq.push(['_setCustomVar', 1, 'Social Referral: twitter', now, 1]); _gaq.push(['_trackEvent', 'null', 'null', '', , true]); } } </script> 

Sample Implementation:

The Report:
Based on the aforementioned setup, we can generate custom reports like the one illustrated below. These will allow us to attribute credit to social channels for engaging potential customers that convert some time into the future. Furthermore we can also determine exactly when the last social referral occur (see custom variable value field) & attribute credit accordingly.

Social Referral

This, in no way, is a fool proof system but it does offer some extended measurability beyond the basic Google Analytics setup. We can also apply a similar methodology for tracking ROI of tactical branding campaigns; we will take that up in detail in another post. Till then, do let us know if you found this useful.

Leave a Reply

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


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>