Adding JavaScript to Landing Page

Anonymous
Not applicable

Adding JavaScript to Landing Page

Hey all, 

I am working with a customer to get an Optimizely snippet installed on their landing page. The snippet is not getting properly added to the production page even though the snippet was added to the template. 

Can you suggest some common culprits for this?

Thanks!

Tags (1)
3 REPLIES 3
Alok_Ramsisaria
Level 10

Re: Adding JavaScript to Landing Page

Hi Amanda,

As far as it seems, this is possible in case you have created experiments but they are not "Active", or the Code is placed after the JS - the code needs to be before the JS in the head. 
 
Hope this helps! (However, if it doesn't, could you elaborate the way you are implementing it?)
Anonymous
Not applicable

Re: Adding JavaScript to Landing Page

I agree with Alok, it is likely to be the place the JavaScript is placed.

Moving the snippet to the header could be an option, using Design Studio - Landing Page Actions - Edit Page Meta Tags - Custom HEAD HTML.

It would be helpful if you could elaborate in more details.
Anonymous
Not applicable

Re: Adding JavaScript to Landing Page

Thanks! 

The issue is not with the experiments, but rather with Optimizely not being defined on the page. The snippet is not properly being added to the landing page. 

Thanks for the tip Breno, I will relay this message and provide additional details if this does not work!