Solved

Excluding Facebook social sign-in from referrals

  • 15 September 2023
  • 2 replies
  • 191 views

As new Amplitude users we noticed a weird pattern in our attribution data where Facebook.com and accounts.google.com were being attributed as referrers for a significant number of our registration events.

We quickly realised that when our users opted to authenticate via Google or Facebook’s social sign-in, they were temporarily leaving our domain to go to the respective site to give us permission to authenticate. When they come back to our domain, despite it still being the same session, Amplitude is overwriting the true attribution data e.g. referrer, referring domain, UTMs, etc, with either facebook.com or accounts.google.com.

We’ve excluded accounts.google.com as a referrer which neatly solves that one. Annoyingly as visitors who come from Facebook appear as facebook.com regardless of whether they clicked on a link, or came via the authentication page there’s no way to exclude that domain without losing attribution on genuine organic FB registrations.

We’ve been speaking with Amplitude support but hit a wall, so I’m reaching out here in the hope that there’s a community solution out there for us! 

Questions

  1. Has anyone else faced this issue? Am I missing an obvious solution?? 
  2. Is there any way to set attribution to only write user properties once per session? 
  3. Is there any way to stop Amplitude rewriting attribution data at a URL subfolder level e.g. domain.com/register/ 

 

icon

Best answer by Patrick Hillery 12 December 2023, 22:01

View original

2 replies

@MrFunnel Were you able to find a solution for this? We are facing the same issue.

Also, you said ‘We’ve excluded accounts.google.com as a referrer which neatly solves that one’.
How did you exclude accounts.google.com?

Hey @MrFunnel and @Tarun Heda, thank you for asking this question.

You can exclude referrers via the “excludeReferrers: [location.hostname],” parameter.  The array of values can include domains and directories like “domain.com/register”.

https://www.docs.developers.amplitude.com/data/sdks/browser-2/#advanced-configuration-for-tracking-marketing-attribution

In the latest JS SDK Browser 2.0, we do not support the ability to capture campaigns & referrers once per session. If you would like us to reconsider and add this functionality please submit your feedback in the help section inside of Amplitude. Please note if it would be best to only exclude tracking mid-session referrers from a facebook.com referrer without campaign parameters.

It looks like there are a few additional options to deal with this situation:

  1. Using JS to reset the referrer under certain conditions (link)
  2. Using a redirect to remove the referrer post authentication (link)

Reply