title: How to programmatically get campaign/source/medium for current Visit in Google Analytics
body: <p>I'd like to know how active are the users depending on the source/medium/campaign of the traffic they came from before sign up. I'm hitting wall when trying to get campaign/source/medium for the current visit from Google Analytics tracker in JS.</p>
  
  <p>I found this <code>tracker.get()</code> method: <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference#get" rel="noreferrer">https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference#get</a> but they don't specify what are the possible values for 'fieldName'. I inspected the tracker object in Firebug and found out the screen attached screen grab:</p>
  
  <p><img src="https://i.stack.imgur.com/GRVHd.png" alt="inspection of the tracker object"></p>
  
  <p>Are these the only fields that I can query? Is reading any of the campaign fields possible? I understand that GA intends to be anonymous, but I figured this information is not really a secret...</p>
  
  <p>If I can't retrieve this information from GA tracker, how would you approach this question? Should I set my own cookie whenever there's a visit with utm_ parameters and then read it if the visitor chooses to sign up?</p>
  
  <p>I'm aware of this response: <a href="https://stackoverflow.com/questions/1688657/how-do-i-extract-google-analytics-campaign-data-from-their-cookie-with-javascrip">How do I extract Google Analytics campaign data from their cookie with Javascript?</a> but a comment says parsing a cookie won't work for AdWords traffic..</p>