Reputation: 33
We have an user self care portal, where we use GA to track the site. There is an external site to our portal which also uses GA to track its usage. (Both are using same GA account)
They have a login prompt, which redirects the user to our site.
What they have in their login prompt, is a simple form which calls our portals - "login manager" URL.
Our login manager is a Coldfusion component, which initiates the session and writes Coldfusion's default CFID & CFTOKEN values on to browser cookie.
What they are claiming now is the Coldfusion login manager is not letting the GA cookies set by the external site to stay in the browser. Rather it overwrites them. So once the user is successfully logged in, the GA cookie set by the external site is disappeared and only our sites cookies are available. It is showing up as a referral (utmccn=(referral)|utmcmd=referral), and as a completely new visitor. So they couldn't track the usage of the external site.
I am not getting the problem correct here. They are asking why it is preventing the existing variables from being passed.
The Login Manager is overwriting all existing cookies and It needs to allow the existing Google Analytics cookie to be continue.
Is it something I can do from Coldfusion end??
Any advice would be much helpful.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXX-1']);
_gaq.push(['_setDomainName', '.example.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google- analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
Upvotes: 2
Views: 986
Reputation: 14435
Cross domain tracking needs to be enabled on both sites - theirs and the CF site.
The cookies are not being overwritten and they are staying in the browser. There is a GA cookie set for their domain and the CF domain. GA can't and won't set third-party cookies nor can it read cookies set by other domains even if they are GA cookies.
It appears as if they are overwritten because they have the same name but they are not because they have different domains. One domain cannot read or overwrite another domain's cookies.
See Tracking Multiple Domains to set up cross domain tracking.
Upvotes: 3