Share
Contents
If your website allows users to log in using Facebook or Google social sign-in buttons, your Google Analytics 4 property most likely receives login traffic that makes your reports incorrect.
Therefore, you may need to exclude Facebook and Google social sign-in traffic from your referrals in Google Analytics 4 to have accurate data you can rely on. This article will guide you on how to do it properly with referral exclusion list.
How to exclude Google social sign-in traffic in Google Analytics 4
Let’s start with the first case, when you have Google social sign-in button on your website, and your users can use it to log in to their profiles.
Suppose you have it and you didn’t use referral exclusion or exclusion of unwanted referrals in Google Analytics 4. In that case, you will see “accounts.google.com / referral” traffic in the GA4 Traffic Acquisition Session source / medium report.
It happens because your users a) leave your website to Google website, b) provide their credentials and c) return to your website from the source “accounts.google.com”.
To avoid this situation, you should add “accounts.google.com” to your GA4 property as an unwanted referral. It’s easy; everything you should do is the following steps:
- Go to Admin -> Data Streams -> Web Data Stream Details -> Configure Tag Settings -> List unwanted referrals
- Include “accounts.google.com” as a domain you want to exclude from your GA4 property.
After you take these two steps, GA4 won’t consider “accounts.google.com” as the referral and won’t show it in the traffic reports. The traffic will be assigned to the source that initially acquired the traffic.
How to exclude Facebook social sign-in traffic in Google Analytics 4
Let’s proceed with the second case now. Suppose you have a Facebook social sign-in button and receive login traffic, but in this case, it most likely shows the same way as your Social Organic Facebook traffic, and you can’t distinguish it.
As a sequence, you can’t use the referral exclusion list we used for Google sign-in traffic because, in this case, you will exclude all your Facebook organic traffic.
Unfortunately, you need the help of your devs to change it properly. The idea is to exclude the referrer on the page users land from authenticating by placing the code below.
gtag('config', 'G-XXXXXXX', {
ignore_referrer: 'true'
});
Once your developers add this code, please always remember to check it out by manually logging into your profile and using DebugView.
Conclusions
Google Analytics 4 can sometimes report Facebook and Google social sign-in traffic as referral traffic. In this case, we should use the aforementioned methods to exclude this traffic from our analytics.
If you encounter any issues with the implementation or have a question, don’t hesitate to leave a comment below.
Frequently Asked Questions
To exclude login traffic in GA4, you should take the following steps:
1. Go to Admin -> Data Streams -> Web Data Stream Details -> Configure Tag Settings -> List unwanted referrals
2. Include the domain that sends login traffic.
1. Go to Admin -> Data Streams -> Web Data Stream Details -> Configure Tag Settings -> List unwanted referrals
2. Include “accounts.google.com” as a domain you want to exclude from your GA4 property.
Ask your devs to place the following code on the page users land from Facebook authentication.
gtag(‘config’, ‘G-XXXXXXX’, {
ignore_referrer: ‘true’
});
You Might Also Like
Written By
Ihar Vakulski
With over 8 years of experience working with SaaS, iGaming, and eCommerce companies, Ihar shares expert insights on building and scaling businesses for sustainable growth and success.
KEEP LEARNING
BigQuery is a leading data warehouse solution, and though its costs are relatively low compared to other solutions, you should estimate BigQuery costs beforehand. Otherwise,…
BigQuery is an excellent data warehouse solution until you pay thousands of dollars for that. After you reach this situation, you start to wonder how…
Leave a Comment
Your email address will not be published. Required fields are marked *
Stay Updated About Every New GA4 Feature
Subscribe to this newsletter to learn more about new Google Analytics 4 features and adjustments.
No SPAM and only relevant content guaranteed!
2 Replies to “How to exclude Facebook and Google social sign-in traffic from your referrals in Google Analytics 4”
Will a sessions with Google log-in as a referral become “Direct” traffic after this exclusion? Or if the session originates from, let’s say, an “Email campaign”, will the referral be changed from “Google log-in” to “Email”?
In this case, the referral will be changed from “Google log-in” to “Email campaign”.