Forum Discussion
5 Replies
- peterlu2 months agoChampion
duahire
this article may be able to help you
https://developer.khoros.com/khorosauroradevdocs/docs/configurable-page-scripts - sleslie992 months agoAdvisor
Did that document resolve your problem? Curious because I'm working a project that needs to use google tags. TY, sara
- duahire31 days agoAdept
sleslieActually that document works for me but we cannot use actual script provided by Google Tag manager. We need some modification. We need to modify in such way that script URL get included into the DOM
- ShannonJ30 days agoMentor
When we moved from Classic to Aurora, GTM & Analytics were removed, and it took us weeks to realize it (lesson learned).
We ended up working with Khoros partner/Grazitti to get GTM and Google Analytics working in our Equinix Community, which is on Aurora.
I didn't hear anything when they implemented it on any issues. Maybe they'll chime in here? - peterlu7 days agoChampion
duahire sleslie99 ShannonJ
Here is how I think it will work to implement GTM on Aurora. Please correct me if I am wrong. Below is the Github code level implementation.Step 1:
under res/pagescripts/, create a folder called "analytics" (res/pagescripts/analytics)
Step 2:
under res/pagescripts/, there should be a file called "groups.scripts.json", edit this file (if not exist, create it),{ "beforeInteractiveFirst": ["analytics"], "beforeInteractiveLast": [], "afterInteractive": [], "lazyOnLoad": [] }
Step 3:
create "analytics.script.json" under res/pagescripts/analytics/{ "id": "analytics", "assets": ["analytics.js"] }
Step 4:
create "analytics.js" under res/pagescripts/analytics/, replace GTM-XXXXXXXX with your own GTM-ID(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXXXX');
Step 5:
Commit and deploy.
Related Content
- 4 months ago
- 2 years ago
- 2 years ago
- 2 years ago