Just a quick blog
We’re interested for Great Writers in getting as much reuse information as possible – but certain things are hard to track. We did some experimenting and we think we have a working block of code which will track when people are copying text from your website.
Here it is
function copyHandler(){
_gaq.push(['_trackEvent','copyandpaste','copy',window.location.href]);
}
function add_copy_listener(){
if(document.addEventListener){
document.addEventListener ("copy", copyHandler);
}else{
document.body.attachEvent ("oncopy", copyHandler);
}
}
if(window.addEventListener)
window.addEventListener('load', add_copy_listener, false);
else if(window.attachEvent)
window.attachEvent('onload', add_copy_listener);
}
We might add to it at a later date to detect where text is copied from, but this at the moment adds to Google analytics an “event” each time some one either “click copy”‘s or use a keyboard shortcut.
Thought this was worth sharing.