Rich-text Reply

Integrating split test with javascript

Rwreact 05-14-14

Integrating split test with javascript

Hello - looking for some consultation or help.  


My clients place a piece of javacode in the header of their website.   It is used to boost conversions. 


I need to integrate Optimizely split test code so I can randomize / split test turning the code on and off in order 

to cleanly and clearly show my clients that I am giving them a conversion boost.  


Can someone help?  Please email or call me at 415-812-5923

Level 1

Re: Integrating split test with javascript

Hi @Rwreact,


I do hope someone was able to connect with you and answer your below question.  If not, here is some guidance that may prove helpful.


Optimizely runs client-side, so we can only modify elements that are part of the DOM.  If another script file has already loaded in the DOM, Optimizely cannot comment that script out; even if we did, the script's effects have already run.  You could pursue one of the following options:

  1. Programmatically undo the code that other script executed
  2. Take the code off of your site, and then use Optimizely to selectively add it in via a single variation in an A/B test

You may also file a case with our Support team here if you still need further assistance.

Harrison Krat
Solutions Architect | Optimizely, Inc.