0

Hi I have setup Google Tag Manager and added the script in the index file following the instructions and I added the AngulariticsModule, Angularitics2GoogleTagManager.

But when I go to Google Tag Manager and view Realtime Overview. I can see that it works up correctly showing the current page that the user is in but when I go to a different page it doesn't update the activePage. but under the activatedPage I see an event coming in for the pageview with the new page that I just went to and even the history because I added some tags. However the only way I found to change the ActivaPage is to Refresh the page.

you can see in this picture that I initiated the page in the appointments but even if I changed it and I did get the page view and history saying that I changed the page but the active page still says appointments you can see in this picture that I initiated the page in the appointments but even if I changed it and I did get the page view and history saying that I changed the page but the active page still says appointments

this is a picture of the history: this is a picture of the history

I am using: @angular/cli 17.3.8

5
  • can you show the actual dimension that's being sent that has the old page name? As long as document.location data is updated on your navigations, you should be ok. Commented Nov 14, 2024 at 20:58
  • @BNazaruk thx for the response, did you mean history? if yes I just added it Commented Nov 14, 2024 at 21:05
  • so seems to me like the new url is determined correctly? What's the problem then? Commented Nov 14, 2024 at 22:16
  • @BNazaruk but the current page (activepage ) in google tags manager didn't change isn't that important?? Commented Nov 15, 2024 at 8:20
  • unless you can see it out of place in the network call, it's not worth mentioning. Commented Nov 15, 2024 at 17:40

1 Answer 1

0

Use Angular Google Tag Manager library, you need to track your events on router change. You have instructions here: https://www.npmjs.com/package/angular-google-tag-manager.

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.