Last active
August 29, 2015 14:00
-
-
Save tfayyaz/11099857 to your computer and use it in GitHub Desktop.
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
(function(){ | |
var currentTags = document.getElementsByTagName('script'); | |
var noTags = currentTags.length; | |
var gaTagsFound = [] | |
for (var i = 0; i < noTags; i++) { | |
if (currentTags[i].innerText.indexOf('_gaq.push([\'_setAccount\', \'UA-12457755-1\'])') > -1){ | |
gaTagsFound.push(i) | |
// console.log(i); | |
// console.log(currentTags[i].innerText) | |
} | |
} | |
// console.log(gaTagsFound) | |
// console.log(gaTagsFound.length) | |
if (gaTagsFound.length > 0) { | |
return true; | |
} else { | |
return false; | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment