Feature #6090

Google Analytics - add support for Universal Analytics

Added by Tim Hutchinson over 5 years ago. Updated 20 days ago.

Status:VerifiedStart date:12/06/2013
Priority:MediumDue date:
Assignee:Sara Allain% Done:


Target version:Release 2.5.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:


I'm not sure if this was already on the radar, but I've been looking into the ongoing changes to Google Analytics.

According to the Universal Analytics upgrade guide (https://developers.google.com/analytics/devguides/collection/upgrade/?hl=en_US), "All Google Analytics properties will soon be required to use Universal Analytics. Any properties that don’t follow the upgrade process will be auto-transferred to Universal Analytics in the future."

The javascript snippet for Universal Analytics looks like this:

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-25753643-7', 'scaa.sk.ca');
  ga('send', 'pageview');


The only new variable seems to be the domain, which may already exist as a setting somewhere; or else would need to be extracted or added as a parameter.

The native support for Google Analytics is a very helpful addition, by the way - I lost a few months of data since we forgot to re-add the snippet after upgrading. And the ability to track by institution looks very interesting.

Related issues

Related to Access to Memory (AtoM) - Task #12209: Add Google Analytics custom dimension for institution names Verified 03/29/2018


#1 Updated by Tim Hutchinson over 5 years ago

Actually, it looks like the top-level domain is only needed to support cross-domain tracking (which would be useful). My snippet might have been generated that way since I have several properties within a single account. See:

#2 Updated by Dan Gillean over 5 years ago

  • Category set to Web service API
  • Assignee set to Jesús García Crespo
  • Target version set to Release 2.0.2

#3 Updated by Jesús García Crespo over 4 years ago

  • Target version changed from Release 2.0.2 to Release 2.1.0

#4 Updated by David Juhasz over 4 years ago

  • Description updated (diff)

Wrap <script> in <pre>

#5 Updated by Jesús García Crespo over 4 years ago

  • Target version changed from Release 2.1.0 to Release 2.2.0

#6 Updated by Sarah Romkey about 4 years ago

  • Target version deleted (Release 2.2.0)

#7 Updated by Dan Gillean almost 4 years ago

  • Project changed from Access to Memory (AtoM) to AtoM Wishlist
  • Category deleted (Web service API)

Moved to AtoM wishlist until sponsored for inclusion.

#8 Updated by Jesús García Crespo almost 4 years ago

  • Assignee deleted (Jesús García Crespo)

#9 Updated by Mike Cantelon 12 months ago

  • Status changed from New to Feedback
  • Assignee set to David Juhasz

I think this issue was fixed by Radda recently in this commit relating to #12209:


According to https://developers.google.com/analytics/devguides/collection/analyticsjs/ we are now using (in apps/qubit/templates/_footer.php) a JS snippet that references analytics.js (Universal Analytics) rather than the old ga.js library. The snippet we're currently using, if I'm reading the docs correctly, offers better performance than the snippet in this issue's description.

#10 Updated by José Raddaoui Marín 12 months ago

  • Target version set to Release 2.5.0

Good catch Mike! Already added to qa/2.5.x.

#11 Updated by David Juhasz 12 months ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from David Juhasz to Dan Gillean

Dan, assigning to you for QA and documentation.

#12 Updated by Dan Gillean 12 months ago

  • Related to Task #12209: Add Google Analytics custom dimension for institution names added

#13 Updated by Dan Gillean 12 months ago

  • Project changed from AtoM Wishlist to Access to Memory (AtoM)
  • Assignee changed from Dan Gillean to Sara Allain

See also #12209

Sara Allain has been working on documentation and testing for Institutional views already: https://github.com/artefactual/atom-docs/pull/43

#14 Updated by Sara Allain 12 months ago

  • Status changed from QA/Review to Verified

This was resolved as part of this PR: https://github.com/artefactual/atom/pull/706

#15 Updated by Dan Gillean 20 days ago

  • Category set to Reporting

Also available in: Atom PDF