Rich-text Reply

Adding Optimizely snippet using Google Tag Manager

QMarketing 08-12-14

Adding Optimizely snippet using Google Tag Manager

I am trying to add the Optimizely snippet to my site using Google Tag Manager.  I followed the instructions from this article: https://help.optimizely.com/hc/en-us/articles/200040095-Implementing-the-Optimizely-Snippet but was unsuccessful.  The Optimizely tag doesn't seem to fire. 

 

Has anyone been successful with this process? Any tips or advice is greatly appreciated.

 

Thanks! 

33Sticks 08-12-14
 

Re: Adding Optimizely snippet using Google Tag Manager

Should be really straight forward, I have Optimizely deployed using GTM and it's working exactly as expected. Here is a screenshot of my Tag in GTM:

 

Optimizely via GTM

 

Are you getting any errors or is the Optimizely Snippet not being injected into your page?

Jason Thompson
Co-founder, 33 Sticks
Level 3
QMarketing 08-12-14
 

Re: Adding Optimizely snippet using Google Tag Manager

Thanks for your reply. Is that exactly what you did? No other minor details or tricks? Because I had the exact same thing and it didn't seem to work. The tag fired in debug mode but when published, it didn't appear to being working on site and also, when I tried to start the experiment in Optimizely, it gave a warning message about how it couldn't find the snippet on the page.
33Sticks 08-12-14
 

Re: Adding Optimizely snippet using Google Tag Manager

That's it, no other details to it. When you publish, have you verified that there are no JavaScript errors on the page that may interfering with the Optimizely snippet?

Also, if you haven't already, I would enable Debug mode (which can be found under the Preview menu in GTM), this will print out detailed info, to the console window, about the firing status of the tags.
Jason Thompson
Co-founder, 33 Sticks
Level 3
Kathryn 08-13-14
 

Re: Adding Optimizely snippet using Google Tag Manager

Hi there,

 

The other commenter has already given you some solid advice, but I just wanted to add that if your only concern has to do with the diagnostic editor giving a warning message about how the snippet cannot be found on the page, this is actually normal. The diagnostic editor can only locate the snippet when it is defined natively on the page, which is not the case when using a tag manager. We're currently working on making this messaging more clear, but if your experiment seems to be working otherwise (i.e. you can see the variations, it is receiving visitors), please simply disregard the error message.

 

-Kathryn

Optimizely
QMarketing 08-13-14
 

Re: Adding Optimizely snippet using Google Tag Manager

Thanks for all your help, Sticks and Kathryn!!