Skip to content

Instantly share code, notes, and snippets.

@maxcal
Created September 20, 2011 23:39
Show Gist options
  • Save maxcal/1230744 to your computer and use it in GitHub Desktop.
Save maxcal/1230744 to your computer and use it in GitHub Desktop.
GAQ iframe hack
// Disable GAQ push in iframe
(function(){
// If in iframe
if ( window.location !== window.parent.location ){
// try to unset _gaq.push
try {
_gaq.push = function(){};
}
catch(err) {
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment