1.9K members online now
1.9K 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
Highlighted

Problem with Google Tag Manager and Google Optimize

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi together!

 

i despair of setting up google optimize. We want to implement google optimize with the google tag manager. We also do have the analytics code integrated via the google tag manager.

 

I followed those instructions:

- https://support.google.com/tagmanager/answer/7164339?hl=en

https://support.google.com/360suite/optimize/answer/7359264

https://support.google.com/360suite/optimize/answer/6314801

 

I tried everything 5 times. But i still get the error:

"The Google Optimize snippet for the container with ID GTM-K49BT24 is not correctly installed on this page. To preview variants for this experiment, make sure the Google Optimize snippet is installed on any pages you want to test."

 

We have no idea what is going wrong. Every tag is fired on the page. We see everything in the tag manager debug mode and also in the analytics debug mode. 

 

Can you please tell me what we are doing wrong?

 

Thanks in advance 

 

Joe

 

 

1 Expert replyverified_user

Problem with Google Tag Manager and Google Optimize

Google Employee
# 2
Google Employee

Hi

 

Are you still facing this problem? Was the problem with preview or were you able to start an experiment and things were not working?

 

I supposed that you followed the instructions about tag sequencing and still things didn't seem to work right?

 

Is there a possibility that this was because of browser caching? Even after you publish your GTM container, there is a browser cache period (I think 15 min) until changes propagate to your browser (unless you clear cache: i.e. open devtools and click disable cache).

 

A few ideas to help you troubleshoot:

- Make sure that you don't have an analytics blocker - analytics.js needs to be able to run in order to load Optimize

- Open dev tools and filter requests for GTM-. If things work you should be seeing 2 requests, one for GTM and one for Optimize.

 

Sorry for the problems that you have been facing - hopefully there be improvements for tools and documentation in the future.

Problem with Google Tag Manager and Google Optimize

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi together!

 

I have this problem as well. I've tried to implement Optimize with Tag Manager in 3 different ways - nothing worked.

The implementation with the Universal Analytics code worked on the 1st time.

 

I read in an other community, that a guy wanted to implement Optimize in 3 website with Tag Manager. 2 Websites were easy to implement, on the last one he had no chance to get Optimize running.

 

For me it looks like, that there are now only 2 ways to avoid i.e. duplicate page view tracking:

1) Use Tag Manager and Analytics, but no Optimize

2) Use Optimize and Analytics, but no Tag Manager

 

Please help!

 

Best regards

Tom

Problem with Google Tag Manager and Google Optimize

Google Employee
# 4
Google Employee

The recommended way for using both tag manager and Optimize, is to do the normal Optimize+Analytics installation but without the line

ga('send', 'pageview');
To avoid sending double pageview hits. See:
 
The tricky thing with that approach, is that if you have custom configuration in GTM (i.e. cross domain tracking etc), you need to also set this up inline using ga configuration options.
This installation is recommended because it may be slightly faster for some sites (depends also on
where GTM has been installed in the page).
 
The alternative is to use the Optimize tag:
 
But this is not as simple as firing the tag - you need to setup sequencing to avoid double hits, see 
Step 2: Configure the Optimize tag in Tag Manager
 
If you have a case where things don't work it wold be nice if you could share the container ID.

Problem with Google Tag Manager and Google Optimize

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi Dimitris,

 

thank you so much for your quick and helpful reply.

I'm glad to hear that there's an alternative way for implementing Optimize without Tag Manager.

 

But I really prefer the Tag Manager solution and in my Tag Manager account Optimize is currently configured like it is described on https://support.google.com/360suite/optimize/answer/6314801.

I would be very happy if you can check this configuration for the Tag Manager Container-ID GTM-52K8D3Z and Optimize Container-ID GTM-548R6D4.

 

Thanks in advance!

Tom

Problem with Google Tag Manager and Google Optimize

Google Employee
# 6
Google Employee

I think that there is still some incomplete work with the Optimize tag in GTM that is causing confusion.

 

Use your real property ID (i.e. UA-XXXX-) instead of your Google Analytics settings variable for the Optimize "Google Analytics Tracking ID".

 

Since you don't have any other complicated configuration (and copied out some properties) you should be OK.