8

TL;DR; Facebook login makes the original referral URL change since and in GA it will look like they originally came from a Facebook.

We have the following problem using Google Analytics (UA) for Facebook (Oauth) login:

  • user lands on /page/1?utm_campaign=aaa and GA session is created with correct initial referrer, campaign etc.

  • user visits a few other pages and decides to register using Facebook

  • Facebook login makes the user's browser to go to facebook and come back which changes the referral and thus creates a new GA session

  • When user lands back on our callback url we fire an event that is converted to goal in GA

The problem is that all users who register using Oauth have the referral set to Facebook and the landing page to the page where they land after Facebook's callback because that's when GA "resets" the session :( .

Is there a way of joining the two sessions in GA and making it know that it is the same user all the time so that Facebook registers keep the full information on initial referrer, landing page, UTMs etc. ?

luigi7up
  • 5,779
  • 2
  • 48
  • 58
  • For those who are trying to figure this out I found this Q/A http://stackoverflow.com/questions/23923605/universal-analytics-and-signup-with-facebook?rq=1 – luigi7up Mar 21 '16 at 14:11
  • And this might be helpful too: http://stackoverflow.com/questions/9979349/passing-on-the-http-referrer-site-a-b-c-a-to-c – luigi7up Mar 21 '16 at 14:21

1 Answers1

0

Follow FB SDK example and OAuth dialog will open in a popup window. It will remove the issue with GA.

Most of OAuth providers that I know also support opening a dialog in a popup window.

Max Ostapenko
  • 536
  • 5
  • 15