2

I have google analytics on my website which is a web service that interfaces to the Google Analytics API. During the oAuth Authentication users are redirected to Google. My problem is that accounts.google.com becomes the ga:source even though they originally came from another site.

What is the best way to prevent this?

M Schenkel
  • 6,294
  • 12
  • 62
  • 107
  • 1
    This question appears to be off-topic because it is aimed at [webmasters](http://webmasters.stackexchange.com) – Rowland Shaw Oct 04 '14 at 17:55
  • Is "account.google.com" the source on every such session or just those that stay idle for ~20 minutes? Also, what are the snippets and relations between the hostnames before and after auth? – lossleader Oct 04 '14 at 20:00
  • @lossleader - don't think it has anything to do with how long they are idle. I have a "Authenticated Google" Goal. This goal is fired once they return from google authentication. When I look at my own Google Analytics, for this goal the referring site is always account.google.com, even though they originally came from another site. – M Schenkel Oct 08 '14 at 18:23
  • @MSchenkel you would be either using independent cookies or trouncing the cookie because of mismatched scope in subdomains or it really is a "new session" due to timeout or something like utm parameters in your redirect url. You either need to debug your own session with the chrome extension or look very closely at the data for everyone who has done something that requires the auth, which may not be everyone you see in your goal. – lossleader Oct 08 '14 at 18:35
  • Thanks for the reply. I did a little experiment. Cleared out all cookies. Then went to a site that references my site and used it to get to my site. I took a look at the cookies and see one there named _ga with value GA1.2.978908558.1412803078 . I then went through my signup process (i.e. so that I would go to google and be redirected back), and observed the cookie again. It had the same value. Does this mean there is no "cookie trouncing"? Am I looking for the correct thing? – M Schenkel Oct 08 '14 at 21:24
  • did some more research. The second answer in the following post describes my dilemna: http://stackoverflow.com/questions/8792139/using-google-analytics-to-track-the-same-session-in-client-javascript-and-server – M Schenkel Oct 08 '14 at 22:02

1 Answers1

2

Found it on at this stackoverflow.com answer:

Goto Admin -> Property Settings -> Tracking info -> Referral Exclusion List and enter the domain name of you payment gateway

Community
  • 1
  • 1
M Schenkel
  • 6,294
  • 12
  • 62
  • 107
  • 2
    I've done this for accounts.google.com. But what about accounts.google.de and accounts.google.ch, etc. Can you add a wildcard like: accounts.google.* ? – Troy May 26 '18 at 14:23
  • 1
    If you do this, what happens to those sessions? Do they revert to their original source, or do they just get committed from the acquisition analysis? – ChrisFox Jun 19 '20 at 07:42