AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Optimize
1.5K members online now
1.5K 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 Does Not Work Through a GTM Environment Snippet

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

So I am deploying an Optimize 360 enable container through the default GTM 'live' snippet on a client's productions site, and wanted to also setup a sandbox, with a different, non-360 Optimize container on the same client's staging site.

 

The stage site has a 'STAGE' GTM environment snippet deployed to it, and not the default 'live' GTM snippet.

I configured the same Optimize tag to set the GUA property ID and Optimize container ID based on the hostname. The correct values for STAGE/PROD are being loaded as expected.

So Optimize appears to only work on the production site with the default GTM snippet, on the STAGE site where the the GTM environment snippet is deployed, I can not preview, and tests do not appear to actually run, though I see no errors throughout the setup process.

The GTM environment snippet seems like the only factor here that would account for Optimize failing to run on STAGE.

Anyone else experience similar issues?