Forum Discussion
6 Replies
- peterlu1 year agoChampion
duahire
this article may be able to help you
https://developer.khoros.com/khorosauroradevdocs/docs/configurable-page-scriptsSign in to react to this post - sleslie991 year agoLeader
Did that document resolve your problem? Curious because I'm working a project that needs to use google tags. TY, sara
Sign in to react to this post - duahire1 year 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
Sign in to react to this post - Inactive User1 year agoNot applicable
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?Sign in to react to this post - peterlu1 year agoChampion
duahire sleslie99 Inactive User
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.Sign in to react to this post - KeremA1 year agoKhoros Staff
Third-party analytics is now supported in admin: https://community.khoros.com/kb/khoros-communities-aurora-docs/add-third-party-analytics-to-your-community/768733
Sign in to react to this post