OER Copy tracking using Google Analytics

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(){



function add_copy_listener(){


document.addEventListener ("copy", copyHandler);


document.body.attachEvent ("oncopy", copyHandler);



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.

Posted in Content, copyright, dissemination, ukoer | Leave a comment

Leave a Reply