Tuesday, 22 April 2014

Track The People Who Print Webpages From Your Site

You may make your website printed friends but you don’t know people printing your web pages. If people print, do you know how frequently the webpages people print from your site and what kind of content the print very often?
To print a webpage there are number of ways.
To send current webpage to the print, use print menu which is in option or ctrl+p keyword short cut. If your is Mac then command+p. Some webpages have direct button to print so that we can print without any problem.
               We have to tract and capture the people who are taking prints of our webpages. For this Google analytics will help us.
Google Analytics tract printed web pages:
Add invisible 1x1 tracking image to website of printed version of the webpages. When anyone takes the printout then the tracking image will get download and notes complete information about who is printing the webpages and what kind of content they are frequently printing will be recorded to Google analytics.
It is easy implementation. A code will be available, which we need to paste it about the </body> tag in the website template. If you site is a wordpress site then you need to paste that code in the footer.php file. But you need to make a change in the code that is instead of the UA-1234-56 you have to write the Google Analytics profile ID.
<script>
Var googleAccount=”UA-1234-56”;
function s4()
{
return Math.floor((1+Math.room())*0x10000).toString(16).substring(1);
}
function guide()
{
return s4()+s4()+’-‘+s4+’-‘+s4+’-‘+s4+’-‘+s4+s4+s4;
}
function(){
var 
GIF=https://ssl.googleanalytics.com/collect1&t=event+”&ec=print&tid=”googleAccountID+”&cid=”+guide()+”&z=”(Math.round((newDate()).getTime()/1000)).toString()+”&ea=”+encodeURLComponent(document.title)+”&el=”encodeURLComponent(document.location.pathname);
var rule=”body:after{content:url(“+GIF+”)}”;
var head=document.head||document.getElementsByTagName(‘head’)[0];
var css=document.createElement(‘style’);
if(css && head){
css.setAttribute(“type”, “text/css”);
css.SetAttribute(“media”,”print”);
if(css.styleSheet){ //For IE
css.styleSheet.cssText=rule;
}
else
{
css.appendChild(document.createTextNode(rule));
}
Head.appendChild(css);
}
}) ();
</script>
After adding the tracking Java script code into your webpage, then log in to Google Analytics dashboard. Then goto real time and click on event then choose event for the category. The alternative method is goto behavior and then events reports.



No comments:

Post a Comment