Optimize
5.8K members online now
5.8K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply

Google Optimize with Angular JS - not working!

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have a single page application built with AngularJS.

 

I used Google Tag Manager to add the Google Optimize script. 

 

It only works for the first page, when I change pages and return to the page I am experimenting with, the changes are lost.

 

Is there anything special I need to do or something I missed?

 

Thanks in advance...

1 Expert replyverified_user

Google Optimize with Angular JS - not working!

Google Employee
# 2
Google Employee

Have a look at activation events. You need to enable them and also add some additional code on your app that re-activates the experiment whenever Angular JS modifies the page:

 

https://support.google.com/360suite/optimize/answer/7008840?hl=en