How to Fix Self-Referral Traffic in Google Analytics

There is a feature in Google Analytics called “Referral Exclusion List” in which you can add the domains that you don’t want to appear as referrals in your reports. However recently I added some internal sub-domains to the referral exclusion list and even after a couple weeks I was still getting self-referral traffic. After a little investigating and trial and error I finally figured out the issue and so I wanted to share with you how I fixed it. This will save you some time banging your head against your desk. The solution is actually surprisingly easy.

Google Analytics Self-Referral Traffic

Under your “Tracking Info” you can setup a Referral Exclusion List and add domains from which you want to exclude self-referral traffic. This is pretty self explanatory.

These settings only work with the analytics.js version of the tracking code. If you’re using the ga.js version, configure these settings in your code. If you’re transitioning to analytics.js fromga.js, customize these settings to match your previous configuration for data continuity.

So in my example, I had a sub-domain setup on my main site. There could be a lot of reasons you don’t want to see self-referral traffic. Perhaps you have an eCommerce gateway setup, or a web application in which you don’t want that traffic skewing your data.

google analytics self-referral traffic exclusion list

The problem for me occurred was that after adding the sub-domain I was still seeing it under my referral traffic. Even after a couple weeks the self-referral traffic seemed to be going down from this source but still not disappearing.

analytics referrals

Fix Self-Referral Traffic Still Showing Up

Google Analytics has documentation on the exclusion referral list, but what they don’t seem to mention anywhere is the “Session Settings” under “Tracking Info.” This is the hidden piece of the puzzle I was missing when it came to self-referral traffic.

google analytics session settings

By default, under “Session Settings” Google sets the campaign timeout to 6 months. The referral exclusion list does not work for traffic and visitors in which people already have a cookie in their browsers from your website. So if a returning visitor had a referral source set, you add a domain to your exclusion list, they visit your site again, then they will still have that original referral source set. With Google setting this to 6 months it will take that long for the self referrals to disappear. Nobody wants to wait that long!

So the fix? Simply set the campaign timeout to 1 minute, click “Apply,” leave it for a day and you will be good to go! As you can see below the self-referral traffic from my internal sub-domain immediately disappeared.

self-referral traffic gone

You can then set it back to 6 months if you want since all the cookies have been cleared. This was also mentioned in the Google Analytics discussion forum as well. If this little tutorial on how to fix self-referral traffic was helpful, please let me know below.

Here are some additional tutorials I have pertaining to Google Analytics:

author bio
Brian Jackson

I craft actionable content and develop performance-driven WordPress plugins. Connect on X, subscribe to my newsletter (once a month), or buy me coffee.

1 thought on “How to Fix Self-Referral Traffic in Google Analytics”

  1. Hi Brian,

    Thanks, the article was very interesting!

    Just one question: but if we modify the cookie time expiration, don’t we affect our reports for returning visitors?

    Thanks,

    Frederick

    Reply

Leave a Comment

9