AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

3K members online now
3K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
Guide Me

Excluding Staging Site Traffic: Refferal Lists vs Filters vs Both

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

I actually have two dev sites that I would like to exclude from my main site:


I've currently created a referral list for the following:


However, I've also set up filters to exclude the URLs above. 


I was just wondering, is it overkill if I did both? Would I be messing up my traffic data by implementing both exclusions?


Any insights would be great.

Thank you! 

1 Expert replyverified_user

Re: Excluding Staging Site Traffic: Refferal Lists vs Filters vs Both

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi Angeli :-)
by default the main site should already be on the Referral Exclusion List
by default, it will ignore referrals from any hostname that includes so the subdomain will also be ignored.
The problem with this though, is that it will not prevent the traffic from the subdomain from being
tracked, it will simply change the medium to being direct/none instead of referral/stg

Custom js can be used to change that behaviour and a filter can then be used to remove the referral traffic

alternatively if you are able to maybe add Campaign tracking parameters to the urls that lead to the main site
you would then be able to filter out the traffic via the specific campaign

Is there any tracking for the same GA Property setup on the staging sites too?
If so, a View with an include hostname filter for the main site only should be created and added

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here