Rich-text Reply

javascript variation

mpfister 12-19-14

javascript variation

Can custom javascript be added to a particular variation as opposed to the "Experiment JavaScript [which] allows you to write JavaScript that is accessible to all variations, including the original page"?

Level 1

JDahlinANF 12-19-14
 

Re: javascript variation

This is how I do 99% of our experiments.

When viewing your page in the editor, click the blue "edit code" link at the bottom right of the page.

A window for entering your JS flies up from the bottom.

mpfister 12-19-14
 

Re: javascript variation

Do I have to reference an external JS file or can I put the script directly in the Edit Code window that comes up from the bottom? (I've pasted in a short JS snipping, but when running the Experiment, the snippet never executes and I dont see it in source.)

Thanks,
Level 1
JDahlinANF 12-22-14
 

Re: javascript variation

[ Edited ]

You put the javascript code directly into this window - no external files.