angulartics-google-tag-manager | Google Tag Manager Google Analytics plugin | Analytics library
kandi X-RAY | angulartics-google-tag-manager Summary
kandi X-RAY | angulartics-google-tag-manager Summary
Google Tag Manager Google Analytics plugin for Angulartics.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angulartics-google-tag-manager
angulartics-google-tag-manager Key Features
angulartics-google-tag-manager Examples and Code Snippets
Community Discussions
Trending Discussions on angulartics-google-tag-manager
QUESTION
I'm working on an Angular (1.6.8) app in which we've implemented the Angulartics library in combination with Google Analytics and Google Tag Manager extensions. This is all working quite well when I follow the instructions that are provided.
But we seem to have a bit of a special situation, the application that we're building is going to be used by multiple people, and based on who is visiting we fetch user settings from our api (using url parameters to know who is visiting at that time).
These users can manage their settings in a different Angular app, it's in this second app that they provide us with they Tag Manager tag, and their Analytics code.
Now comes the hard part (for me at least), Google Tag Manager requires a script tag in the head of our html, but at that time the user settings have not been loaded from our api yet, so we can't provide Google's script with the correct Tag Manager tag (this format: GTM-XXXXX).
Does anyone know of a way to load these scripts correctly when we have dynamically loaded tracking codes? Or is this just not possible?
Thanks for anyone who can provide some insights.
...ANSWER
Answered 2018-Jul-05 at 11:22Alright it's been a while and I've figured out a solution that does the job (a while ago), I'll display how I got there in case someone else stumbles upon my question.
It ended up being quite simple, I have the following in my html
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angulartics-google-tag-manager
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page