Created
September 20, 2011 23:39
-
-
Save maxcal/1230744 to your computer and use it in GitHub Desktop.
GAQ iframe hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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