4.8K members online now
4.8K members online now
Learn how to create your first experiment and get tips on creating A/B, redirect, and multivariate tests.
Guide Me
star_border
Reply
Highlighted

Editing the original page in an experiment

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hello Optimize Community,

 

Is there a way to add JavaScript to an experiment's original page (aka variation 0 page) via the Optimizely Editor? When I try to inject a function to a page element the Apply button is grayed out.

 

 Optimize_Edit_Original.png

 

If anyone has a workaround for this please let me know. 

 

Thank you for your time!

1 Expert replyverified_user

Editing the original page in an experiment

Google Employee
# 2
Google Employee

Hey Timothy! We don't currently support this, but have considered it.  Can you say more about what you'd use this for?

Editing the original page in an experiment

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Thanks for your response Jon!

 

A couple of uses for being able to edit the original page:

 

1 - Pushing custom code on all test variants. For example, let's say we need to add code that tells an external database which variant a user lands on. In GA we can segment based on each variant, but if a company needs that information somewhere outside of GA (i.e. an advertising agency that has their own database to see which ads led to which variant), having the ability to insert their own code into the original page would make the process simpler, as they could add the same code to each variant.

 

2 - Making edits to new/incomplete pages. For testing brand new pages that haven't been released yet, this would allow for minor changes before beginning the experiment. If we test a page that still has some minor flaws, instead of going back to the developer to make more design edits you could make the edits yourself using the Optimize Editor. That way the original page looks exactly the way you want it before building your variants and running the test.

 

Please let me know if you need any additional information on the benefits of editing a test's original page.

 

Thanks again Jon!

Marked as Best Answer.
Solution
Accepted by Jason O (Community Manager)
February

Editing the original page in an experiment

Google Employee
# 4
Google Employee

Thanks, Timothy!  We'll definitely keep these in mind as we go forward - in the meantime, as a workaround, you might be able to use another variant as the "original", and set the weight of the true original to zero.

 

Hope that helps, and thanks for the feedback!

Jon

Re: Editing the original page in an experiment

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Echoing the OP's request, I also want to run JavaScript on the original. In my case, I am pushing some text into another system that indicates which variant the user is in (i.e. "Test123: Variant A", or "Test123: Variant B) for sales purposes...our sales team needs to know which variant the user is in so they can have the appropriate conversation.

 

@Jon M, I have tried your suggested workaround, but you currently do not allow 0% traffic to any variant, as detailed here: https://www.en.advertisercommunity.com/t5/Google-Optimize-Targeting/100-traffic-allocation-to-single...

Re: Editing the original page in an experiment

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

When I try that, I get "The weight for the original variant has to be greater than 0."

Editing the original page in an experiment

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Another possible us for this is to enable heatmapping using tools like crazyegg. For crazyegg to be able to distinguish between two variants of a screen served from one url I need to add a JS variable to each variant, including the original.

Editing the original page in an experiment

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

I would also like this for setting up javascript variables.

An alternative would be to allow us to switch off some of the combinations, so they don't get tested.

Editing the original page in an experiment

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Hi Jon,

 

Another vote for this feature please.  We use custom javascript in the original and variation to log which bucket the user ends up in into our in-house database.

 

Your workaround does work but unfortuantely then renders the reporting features of Optimize pretty unhelpful as everything is compared to the original which has 0 traffic.

 

Hope you can help with this simple feature.

 

Thanks,

Robert

Editing the original page in an experiment

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

Yeah I also need this feature, A quick fix to allow the original to be set at 0% would be perfect.

Experts in the Topic
Jon M