Adding JavaScript to Landing Page | Community
Skip to main content
July 15, 2014
Question

Adding JavaScript to Landing Page

  • July 15, 2014
  • 3 replies
  • 1197 views
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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Level 10
July 15, 2014
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?)
July 15, 2014
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.
July 15, 2014
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!