Analytics
4.2K members online now
4.2K members online now
Learn to identify referral spam traffic, as well as best practices to reduce referral spam in your Google Analytics account
 
Guide Me
star_border
Reply

Referral spam filter codes blocking real metrics

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi All,

 

We were having some trouble with referral spam on our Google site analytics, so I attempted to write some filter codes based on easily-found articles on the Internet. Since then, I've had nothing but trouble.

 

First, analytics recorded fine for months, but stopped recording as of Dec. 4; analytics showed 0 since Dec. 4, but site property was getting hits (based on a view of "Property Hit Volume" in Advanced Settings). Should be no issue with analytics tracking code, as I used the tracking ID feature native to Google and did not alter site code in any way. Possibly caused by my referral spam filter codes, so I deleted them. Didn't make much of an impact, if any.

 

Untitled.png

 

 

 

Since then, analytics returned in some fashion and metrics/site visits began recording. However, now we're getting the conflicting alert that our site is not properly tagged with an analytics ID, despite analytics reports still rolling in (see upper right for alert notification). Also, to the best of my knowledge, the site is tagged correctly with our analytics ID. I even ran a report on Google Tag Assistant, but no alerts returned.

 

Untitled.png

 

 

Does anyone have any experience with this? At first I thought it was my referral spam codes which were filtering out all traffic, but in reviewing my work and various online articles, I'm sure I did the spam filter codes correctly. This was validated when metrics reports started coming in for the site, around Dec. 20 or so (that is, metrics were dead right after I wrote the referral spam codes, but I reworked them multiple times and eventually analytics turned on). 

 

Now we're getting a related issue - something is wrong with the analytics tracking ID, which can obviously affect reporting. However, I've never touched the site's code to add the tracking ID. I always used the one-step feature native to Google sites so I could avoid dealing with code for each site page (which seemed daunting, which is why I didn't touch it). This worked for a time, but now it is a problem for some reason. Any advice out there?? Thanks in advance!

 

 

 

 

1 Expert replyverified_user

Re: Referral spam filter codes blocking real metrics

Top Contributor
# 2
Top Contributor
To verify your code, open a new browser and visit your site. Then look in the Google Analytics Real Time report to see if it recorded your visit (you know where you live in the map).

Assuming you code is ok, did you remove all of the spam filters that you built?
Mike Sullivan, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: Referral spam filter codes blocking real metrics

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Mike,

 

Thanks for the reply. I opened the site itself on IE, while opening Analytics' Real Time Reporting on Chrome. My site visit was accurately recorded (correct device, location, etc.). So the code must be fine. 

 

I deleted the original filters had written, as I assumed they were problematic. Since then though I have followed some online how-to articles to institute new filters. The four "new" filters are below:

 

Untitled.png

Re: Referral spam filter codes blocking real metrics

Top Contributor
# 4
Top Contributor
I hate to say it, but if the error is wrong, just ignore it (there is even a link for that). Maybe their crawler simply didn't see the code the last time it checked, or maybe it is following other code that got their crawler confused, or your server was too slow to respond, or ...who knows. Think of that as a possible warning...now go seek the cause of the loss of traffic, which is the real concern of yours.

Check out the Acquisition > All Traffic > Channels report, and do a comparison of the traffic before and after your trouble-period. Has all of the traffic dropped across all channels, or it one noticeably affected? If it is across-the-board, does the usual seasonal variations account for the change?
Mike Sullivan, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: Referral spam filter codes blocking real metrics

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi Mike,

 

Hard to say really. This site is internal to our company, so traffic is already relatively low. I will say that, after instituting the filters, traffic did decrease, but traffic is currently stable and it reflects a number which I believe to be more accurate of the site's actual use (that is, now there's not 100+ site visitors each day, but closer to 20-30).

 

Again we're not overly concerned with traffic, since the site is internal and mostly informational (no sales or ads or anything like that). We just want to make sure the metrics are accurate so we can gauge which parts of the site are useful and which aren't.

Re: Referral spam filter codes blocking real metrics

Top Contributor
# 6
Top Contributor
Just a followup...based on the numbers you posted, it is very likely the 'extra' traffic you had before Xmas was spam. GA has really clamped down in the past few weeks.
Mike Sullivan, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.