[Archivesspace_Users_Group] put Google Analytics code snippet in ASpace
Steele, Henry
Henry.Steele at tufts.edu
Fri Mar 20 10:42:03 EDT 2020
Thank you both for your replies and this helpful information. I thought I'd tried that, but I must have tried to mangle the link into the Ruby tag.
It worked! Thank you. I just put this snippet in on dev, and although the GA account isn't set up for dev, the application restarted without issue and I could get to the PUI.
Thanks again!
Henry Steele
Systems Librarian
Tufts University Library Technology Services
(617)627-5239
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Custer, Mark
Sent: Friday, March 20, 2020 10:24 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] put Google Analytics code snippet in ASpace
Henry, all:
We did exactly what Joshua mentioned... added the snippet as provided by Google Tag Manager to the layout_head.html.erb file, and that's it.
Just out of curiosity, is anyone using alternatives to Google Analytics, such as https://matomo.org, with their ASpace PUI?
Mark
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Joshua D. Shaw <Joshua.D.Shaw at dartmouth.edu<mailto:Joshua.D.Shaw at dartmouth.edu>>
Sent: Friday, March 20, 2020 9:35 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: Re: [Archivesspace_Users_Group] put Google Analytics code snippet in ASpace
Hi Henry-
Its probably easiest to just insert the js in the erb file, since the erbs accept raw code (no need to escape) and the google snippet is unchanging. I'd just pop the snippet that Google provides right in there and you should be good to go!
Joshua
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Steele, Henry <Henry.Steele at tufts.edu<mailto:Henry.Steele at tufts.edu>>
Sent: Friday, March 20, 2020 9:09 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] put Google Analytics code snippet in ASpace
Have any of you successfully entered your Google Analytics code snippet JS in ASpace. It goes in the layout head html erb, but I'm not sure how to include this since the existin code there just includes a Ruby tab with only the link as an attribute value. Can I just put raw JS in here, inside a script tag? Also, the GA code snippet has a link tag, but with the "async" attribute and I wasn't sure how to include this.
Thanks
Henry Steele
Systems Librarian
Tufts University Library Technology Services
(617)627-5239
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200320/9e60bcb4/attachment.html>
More information about the Archivesspace_Users_Group
mailing list