58180

Universal Analytics Custom Dimensions with Multiple Trackers - Old tracker recording User-Level Scop

Question:

So, I have a very specific scenario that I hope you can help me with.

I had an <strong>older account</strong> that I upgraded to Universal Analytics, and set up several Custom Dimensions. One of these is a Member/Guest variable at <em>user-level scope</em>.

We decided to make a <strong>new account</strong>, however, to move our site out of another account that had many sites in it. Long story, but since we can't just <em>move</em> an account, we have them both running until Jan. 1, 2015.

I "moved" the Custom Dimensions to the new account (created new custom dimensions that match the old account's), and the page-level scope variables seem to work fine: no more data being logged to the old account, the new account is receiving accurate data.

Here's where it gets weird: We are still getting Member/Guest data logged to our old account, despite the fact that I changed the code to <em>no longer send that data</em> to the old account.

<strong>Is there a possibility UA is "remembering" Users, and setting the Member/Guest data using a cookie?</strong>

You can see what I mean if you use Chrome with the Analytics debug add-on (<a href="https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en" rel="nofollow" title="Google Analytics Debugger Add-On for Chrome">https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en</a>), and visit <a href="http://www.boatlocal.com" rel="nofollow">www.boatlocal.com</a>. You'll see that I'm setting Dimensions in the tracker named "NewTracker", and not setting any Dimensions in the tracker named "OldTracker".

The data doesn't match. The NewTracker gets what looks like accurate data (Members + Guests = Total Sessions), but the OldTracker gets much lower numbers.

Here is the code in question (ASP.net is what accounts for the <%= Tags %>):

(function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); /* This is the OLD tracking code. No Dimensions are sent. */ ga('create', 'UA-1800676-1', 'boatlocal.com', { 'name': 'OldTracker' }); ga('OldTracker.send', 'pageview'); //end of old tracker //This is the NEW Tracking code, with all dimensions set ga('create', 'UA-49699169-1', 'boatlocal.com', { 'name': 'NewTracker' }); /* Send page view and all Dimensions and Metrics to Google: dimension2 : is the user a Member or a Guest? (user level) dimension3 : Component - Which generic component? (Photos/Places/Articles/Forums) */ if ('<%= myPage.analyticsComponent %>' != '') { ga('NewTracker.set', 'dimension3', '<%= myPage.analyticsComponent %>'); } ga('NewTracker.send', 'pageview', { dimension2: "<%= analyticsMemberOrGuest %>", dimension4: "<%=myPage.currentBranch.market%>", dimension5: "<%=myPage.currentBranch.branchName%>" });

Answer1:

Yes, this is how user-level custom dimensions work. They are remembered for users that already had them set. They will be forever remembered, unless their cookie expires (2 years of inactivity by default).

They are remembered using the clientId that GA generates randomly and store in the cookie _ga. The value itself is stored in the GA backend not the cookie.

One option you have is to deactivate the custom dimension you don't use anymore in the old account. Just go into custom dimensions and uncheck the "Active" checkbox. Alternatively you can just ignore them.

Recommend

  • Deleting large amounts of data from SQL Server 2008
  • Problems with Newlines using django on a Windows Server in France
  • Prevent date and time insert to the database
  • having a map of strings how to compare it to given string
  • Openstack.Net SDK cannot access services
  • Finding `n1` TRUEs wrapped in between two `n2` FALSEs, the whole thing wrapped in between `n3` TRUEs
  • How to cache images only in disk using Kingfisher?
  • Why do native C++ projects have a TargetFrameworkVersion?
  • IIS7 Application Request Routing HTTPS
  • Overriding window.location on Webbrowser Control
  • How to use both ga.js and analytics.js?
  • Vim ctags behaves strangely
  • something very wrong with SESSIONS
  • Android libgdx prefs getting lost
  • Sending cookie value via httpget but not getting the desired response
  • Is playing sound in Javascript performance heavy?
  • WPF - CanExecute dosn't fire when raising Commands from a UserControl
  • Chrome doesn't support silverlight anymore? How to solve this?
  • Can I check if a recipient has an automatic reply before I send an email?
  • Ajax jQuery multiple calls at the same time - long wait for answer and not able to cancel
  • Getting last autonumber in access
  • RectangularRangeIndicator format like triangular using dojo
  • How to make a tree having multiple type of nodes and each node can have multiple child nodes in java
  • Cross-Platform Protobuf Serialization
  • Cassandra Data Model
  • Javascript convert timezone issue
  • 'TypeError' while using NSGA2 to solve Multi-objective prob. from pyopt-sparse in OpenMDAO
  • 0x202A in filename: Why?
  • Revoking OAuth Access Token Results in 404 Not Found
  • Codeigniter doesn't let me update entry, because some fields must be unique
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Angular 2 constructor injection vs direct access
  • -fvisibility=hidden not passed by compiler for Debug builds
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Java static initializers and reflection
  • Android Google Maps API OnLocationChanged only called once
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • UserPrincipal.Current returns apppool on IIS