Rich-text Reply

Custom Event must set at original too (code editor)?

Mr-BS 06-27-16
Accepted Solution

Custom Event must set at original too (code editor)?

Hey,

I´m tracking a custom event in the variation like this:

if ($('.step-next').hasClass('active')) {
window['optimizely'] = window['optimizely'] || [];
window.optimizely.push(["trackEvent", "next_step"]);
}

On the Result page the variation received this, but for the original It´s always 0%

Did I have to add the snippet to the original too in the code editor?

 

Level 2

CouchPsycho 06-27-16
 

Re: Custom Event must set at original too (code editor)?

Hi,

 

if you use an event, which is not fired within the original, how should the result be anything else but 0 ?

 

If the refering element also exists in the original you will have to attach the event-"pushing" also....

 

Kind regards

 

Michael




"the essence of the creative act is to see the familiar as strange." (anonymous)
Mr-BS 06-27-16
 

Re: Custom Event must set at original too (code editor)?

Yes Right.

So it´s best practice to add the event in the code-editor under "original" too? 

Level 2
CouchPsycho 06-27-16
 

Re: Custom Event must set at original too (code editor)?

Otherwise it won't be fired, right :-)




"the essence of the creative act is to see the familiar as strange." (anonymous)
robertchan 06-27-16
 

Re: Custom Event must set at original too (code editor)?

Yes, the original needs tracking to provide a control. If you're naming is the same for that event, you could just set it in your global JavaScript.
Robert Chan

Experimentation Hero