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

Google Social signin  button
Google social signin button

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. 

Facebook and Google social sign-in traffic in GA4 referrals
Facebook and Google social sign-in traffic in GA4 referrals

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:

  1. Go to Admin -> Data Streams -> Web Data Stream Details -> Configure Tag Settings -> List unwanted referrals

    Step #1 - Find Unwanted Referral Tab in GA4

  2. Include “accounts.google.com” as a domain you want to exclude from your GA4 property.

    Exclude Google Login Traffic in GA4

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

Facebook Social signin  button
Facebook Social signin button

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. 

Facebook and Google social sign-in traffic in GA4 referrals
Facebook and Google social sign-in traffic in GA4 referrals

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

How do I exclude login traffic from Google Analytics 4 reports?

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. 

How do I exclude Google social sign-in traffic from Google Analytics 4 reports?

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.

How do I exclude Facebook social sign-in traffic from Google Analytics 4 reports?

Ask your devs to place the following code on the page users land from Facebook authentication.
gtag(‘config’, ‘G-XXXXXXX’, {
  ignore_referrer: ‘true’
});

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

2 Replies to “How to exclude Facebook and Google social sign-in traffic from your referrals in Google Analytics 4”

  1. 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”?

Leave a comment

Your email address will not be published. Required fields are marked *

Leave a Comment

Your email address will not be published. Required fields are marked *

[custom_comment_form]