0

I am using Google Tag Manager and I am attempting to create triggers for a website built with AngularJS but since there are no page loads on each 'page visit' due to the fact that it is one page, I am not sure how to create triggers. Any variables I do keep the same value as well as they do not refresh.

Any ideas what I can do?

user861059
  • 43
  • 8
  • You could use GTM history listeners to detect changes in the hash values of the URL, or you could also use virtual page views (eg. http://stackoverflow.com/questions/21397379/google-tag-manger-with-angularjs). Regardless, this is off topic as it's not related to coding. – nyuen Apr 19 '16 at 17:01

1 Answers1

0

Besides history listeners, you can also send JavaScript events and dataLayer variables (for example when you load a part of the page with new data send an event newData and push to the dataLayer page: "/new-view"). Then you can use the event in the trigger and overwrite the page variable in your GA tag with the dataLayer variable and presto, SPA tracking basics.