Optimize
5.2K members online now
5.2K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply

Implement different Javascript codes into different versions?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I was not able to find a way to insert Javascript code into each version. Is there a way to get that done?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Enrico L
July

Implement different Javascript codes into different versions?

Follower ✭ ✭ ✭
# 6
Follower ✭ ✭ ✭

Hi Enrico, the button is greyed out because the test is running. You cannot make changes after a test has run at the moment.

View solution in original post

Implement different Javascript codes into different versions?

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Yes, when you enter a variant, instead of using the WYSIWG, click on the Select elements icon, select the head, and then click on the JavaScript option.

Re: Implement different Javascript codes into different versions?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Robert, 

 

Thank you for your help. I am not sure to make that the correct way. 

 

I clicked on the Icon to select elements and changed the element to 'head' by typing. Well, after this I do not see a javascript icon but a 'more' button that contains several entries for scripts, but it does not matter which of them I click, none opens a field where I could edit or copy-paste the js code in. 

 

What am I doing wrong? Any idea?

 

Thank you in advance. 

 

 

select_head.pngselect_style.png

Implement different Javascript codes into different versions?

Follower ✭ ✭ ✭
# 4
Follower ✭ ✭ ✭

Anytime, in your first image, you should click on ADD CHANGE where you'll have the option to edit the JavaScript. If you've not added a variant, you won't have that option so make sure you add a variant first before attempting to click the ADD CHANGE button, otherwise it will not be available. Please also note that if you're building a multivariate test, you won't be able to edit the original variants for any of your sections which can be frustrating.

Re: Implement different Javascript codes into different versions?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hello Robert,

 

I am in a Variant (as much as I see), but the button is greyed out. Do I overlook something?

 

optimizely.png

 

 

Marked as Best Answer.
Solution
Accepted by topic author Enrico L
July

Implement different Javascript codes into different versions?

Follower ✭ ✭ ✭
# 6
Follower ✭ ✭ ✭

Hi Enrico, the button is greyed out because the test is running. You cannot make changes after a test has run at the moment.