Skip to content

Instantly share code, notes, and snippets.

@ryana
Created June 24, 2016 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryana/e28b76cc256b7e78b8735ba7f7c3a527 to your computer and use it in GitHub Desktop.
Save ryana/e28b76cc256b7e78b8735ba7f7c3a527 to your computer and use it in GitHub Desktop.
Getting real tired of your shit, referrer spammers

Wat

I started seeing a ton of referrer traffic from monetizationking.net. If you fill out the form, it redirects you to adzos.com.

I'm real sick of referrer spam, so let's give them a taste.

In this example, I got Adzos' GA URL:

Adzos

The script below will fake 1000 anonymous visitors in their GA traffic. I tested it on my own GA account first to ensure I could see everything.

  • The fun_note will show up in their list of active pages.
  • The campaign will show up as the campaign
require 'typhoeus'
require 'cgi'
fun_note = "quit-the-referrer-spam"
campaign = CGI.escape "#StopTheSpam"
1000.times do
adzos = "https://www.google-analytics.com/collect?v=1&_v=j44&a=2067107192&t=pageview" +
"&_s=1&dl=https%3A%2F%2Fadzos.com%2F#{fun_note}.html" +
"&ul=en-us&de=UTF-8&dt=#{campaign}" +
"&sd=24-bit&sr=1920x1200&vp=1421x618&je=0&fl=22.0%20r0" +
"&_u=AACAAEABI~&jid=&cid=#{Time.now.to_f}&tid=UA-61667326-1" +
"&z=#{rand 1_000_000_000}"
Typhoeus::Request.get(adzos)
print '.'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment