https://www.newtlabs.co.uk - How GA collects data, how do spammers send invalid data, how do you find the invalid data, how do you remove the invalid data.
2. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
Fixing Google Analytics Spam
3. There are only so many possible GA codes
Anyone can copy your code
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
How GA Collects Data
Problems?
Fixing Google Analytics Spam
4. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
How do spammers send
invalid data
Fixing Google Analytics Spam
5. 1. Evil Clone
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
1. Set up a site with your tracking code
2. Send hits to the site
3. Hits are reflected in your reports with the
aim of getting you to click on them
Fixing Google Analytics Spam
6. 2. Internet of things
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
How they do it?
• Write a script with GA Measurement Protocol
• Send hits via your Google Analytics UA Code
• Hits are reflected in your reports
Fixing Google Analytics Spam
7. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
They don’t always use your UA
code to pollute your data
Fixing Google Analytics Spam
8. 3. Bad Bots
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
How they do it?
• Program a crawler or botnet to visit your site
• Spoof the HTTP headers with fake data
• Set a spam website as the HTTP referrer
• These spoofed website show up in your
referral reports
Fixing Google Analytics Spam
9. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
How do you find the invalid
data
Fixing Google Analytics Spam
10. Finding Ghost Referrer Spam
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
• Invalid hostnames i.e. blog.example.com are
ghost referrer spam
• Filtering out invalid hostnames
solves scenario #1 and #2 (evil clone, iot)
• These hostnames show up as a dimension
in GA reports
Fixing Google Analytics Spam
11. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
Look for domains that you do not own
These are ghost referrers
Fixing Google Analytics Spam
12. Finding BOT Referrer Spam
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
• Referrers are sites where visitors clicked
links to get to your site
• HTTP Request Headers with referrers set
are collected by GA
• These referrers make up the Channels in
GA reports
• Any site that did not send legitimate visitors
are bot spam referrers
• Removing spam referrers solves Scenario #3 (bots)
Fixing Google Analytics Spam
13. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
Look for spam sites that shouldn’t
be sending traffic to your site
Fixing Google Analytics Spam
14. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
How do you remove
the invalid data
Fixing Google Analytics Spam
15. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
To remove from future reports
• Apply a filter to your views include only valid hostnames
- This modifies all data going forward
• Apply a filter to your Views exclude spam referrers
• Set an annotation in Google Analytics
- This reminds you when the filter was applied
To remove from past reports
• Create segments of valid hostnames and exclude spam referrers
- View past data without the invalid hostnames
Remove Google Analytics spam
Fixing Google Analytics Spam
16. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
Raw and Test Views
• You get 25 views for every property in Google Analytics
• Views allow you to add filters to change how data is processed
• Once you add a filter it alters the data forever for that view
• Use a new view to test any new filter before applying it to your main views
• Always try to keep one view completely unfiltered
• Ideally create another back up view with basic filters and goals too
Fixing Google Analytics Spam
17. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
Set a Ghost Filter
Fixing Google Analytics Spam
18. Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
Set a Ghost Segment
Fixing Google Analytics Spam
19. Filter and Segment Bot Referrers
Steven Watts | @bboywattsy @newtlabsuk | newtlabs.co.uk
• Same process: filter to protect future data and segment to fix past data
• Instead of including only good refers, exclude the bad ones
• It is useful to use lists online of known bad referrers
• Use a tool like referrerspamblocker.com to import segments and filters
• Always use a test view first for any filters you apply to data
Fixing Google Analytics Spam