title: Google analytics and Oauth (Facebook login)
body: <p>TL;DR;
  Facebook login makes the original referral URL change since and in GA it will look like they originally came from a Facebook.</p>
  
  <p>We have the following problem using Google Analytics (UA) for Facebook (Oauth) login:</p>
  
  <ul>
  <li><p>user lands on <strong>/page/1?utm_campaign=aaa</strong> and GA session is created with correct initial referrer, campaign etc.</p></li>
  <li><p>user visits a few other pages and decides to register using Facebook</p></li>
  <li><p>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</p></li>
  <li><p>When user lands back on our callback url we fire an event that is converted to goal in GA</p></li>
  </ul>
  
  <p>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 :( .</p>
  
  <p>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 <strong>initial referrer, landing page, UTMs</strong> etc. ?</p>