Optimize
3.8K members online now
3.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
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.

Re: Problem with Google Tag Manager and Google Optimize

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hi everyone,

 

I have the same problem and don't really find an answer here.

Also, I really don't understand the problem, because you would think it's simple as can be, fill in the tags, connect and link the different google accounts and done... 

But unfortunately it's not like that at all. Smiley Sad

 

This is what I get (sorry for the Dutch, but I do assume you will understand what error it gives).

You can see that it keeps giving the 'no fragment' issue in the preview, even though you can see that it is all setup with GTM (and yes it's also published, not only in preview mode).

 

 screenshot-rkw.jpg

 

 

So I read that it is a know bug and you should just publish the experiment, but it doesn't show any results, even though there have been over 60 visitors to that page since the experiment started.

 

I've read these: https://support.google.com/360suite/optimize/answer/7359264 

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

and tried everything I could find on the internet.

The implementation is with Drupal7, but the same problem is on a site with Drupal8.

The webdeveloper has also tried to get it working, updated the GTM module in Drupal and tried all different sorts of settings.

 

GTM is implemented in the <head> as the first script at line 41. It's not possible to get it higher (according to the Drupal developer).

We really don't want to implement it all manually.

 

Please help! 

Kind regards

Problem with Google Tag Manager and Google Optimize

Google Employee
# 8
Google Employee

Hi Hans

 

You are right saying that the setup should be simpler. Hopefully there will be a fix on the Optimize tag in GTM soon.

 

The issue is that the Optimize tag is expecting just the GA property ID in its "Google Analytics Tracking ID" field. This should be just the string UA-205...

 

The current version of the Universal Analytics tag, is using a "Google Analytics Settings" variable. This includes the tracking ID but also allows to specify all other different settings for GA (this is what your current "Google Analytics" variable is).

 

Unfortunately the Optimize tag is not yet able to use it, even though this should be happening very soon (probably in 1-2 weeks at most).

 

For now just type the string UA-205... at the "Google Analytics Tracking ID" field for optimize, or make up a separate simple constant variable (that you could even reuse in the "Google Analytics Settings").

 

When the new version of the Optimize tag becomes available consider switching back to what you have now (use the same "Google Analytics Settings" variable in Analytics and Optimize).

 

I don't think that you have been configuring advanced settings (cross-domain tracking, userid override etc) so it doesn't matter right now, but if you do this in the future the "Google Analytics Settings" variable will ensure that those will be consistent everywhere.

Problem with Google Tag Manager and Google Optimize

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Thank you! It is working now.

Silly thing is that I've encountered this solution for a problem before, but didn't think of it this time.. Maybe you are able to insert an alert to only enter the hard coded UA code?
Thanks though, very happy it's working!

Problem with Google Tag Manager and Google Optimize

Google Employee
# 10
Google Employee

Its very easy to make this mistake and it shouldn't be a mistake really - the "Google Analytics Settings" variable was done to help in situations like this.

 

Its just that the upgrade of GTM's Optimize tag to use it was not ready in time - but it should be there very-very soon (so that there will be no need to for an alert).