Say you have a website that is printer-friendly but you are not too sure if people are actually printing your web pages. And if they are, you are interested to know how often they print pages and what is the kind of content that users are most likely to print on your site.

There are basically three ways to print any standard web page (see above screenshot):
Experienced users may press the Ctrl + P keyboard shortcut (or Command-P on a Mac) to send the current web page to the printer.Some web pages have a dedicated PRINT button on the page itself.Other users may prefer to print web pages from the File Menu that is standard across all browsers.Because there are multiple ways to print the same web page, it is difficult to use JavaScript based event tracking in Google Analytics to track print usage.
A simple workaround is that you add an invisible tracking image (like the ones used for read receipts in email) only in the printed version of a web page. Thus when a user prints a web page, through any route, that tracking image will download on his / her computer and you can easily track the print (and print preview) action.
That was the boring theory but you can safely skip the technical details and get right into implementing the actual tracking code.
All you have to do is copy-paste the following code above the closing

0 comments:
Post a Comment