Rich-text Reply

Experiement not working (variation not showing)

Loui 12-05-16

Experiement not working (variation not showing)

Hi,

 

I have a problem with a test variation not showing, although Optimizely snippet is placed correctly.

URL targetting is setup correct, audience is setup correct (desktop) and I even allocated 100% traffic to the variation. In the result pages the test do get visistors, so it is "running", but it is somehow not showing the variation.

 

Project ID: 7886120858

I tried recreating it as a new test, and it didn't work either.

 

I already did a test on another page of this site, and there was no problem setting up a test.

 

 

I get the following error (see image) in the developer tool.


Error message:

http://i63.tinypic.com/2h5pchy.png 

 

How I want the test to look like:

http://i63.tinypic.com/2mcewxy.png

 

 

Any help appriciated, thanks.

Level 2

robertchan 12-05-16
 

Re: Experiement not working (variation not showing)

The second image isn't loading for me, but from your first image, it looks like you have a syntax error. Check the code that you've input in your experiment and ensure that there are no issues there.
Robert Chan

Experimentation Hero
Loui 12-06-16
 

Re: Experiement not working (variation not showing)

How do I check if that code is correct?

 

 

Level 2
JasonDahlin 12-06-16
 

Re: Experiement not working (variation not showing)

@Loui

 

This is definitely curious...

Looking at variation 7870391739's code, after converting all of the "$" into "jQuery" it runs fine in the console.

 

It looks like there is an issue with the unusual values the site uses for ID ("slash" is a valid attribute for HTML 5 but not under HTML 4.x specs.  I expect this is the issue but this would need to be vetted by someone at Optimizely... maybe @David_Orr or @Breana_Eads has an idea?)

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
Loui 12-07-16
 

Re: Experiement not working (variation not showing)

@JasonDahlin

 

Thanks for response.

 

Interesting, so the way I understand it, is that Optimizely can't work together with the way the site is coded? 

 

Level 2
JasonDahlin 12-09-16
 

Re: Experiement not working (variation not showing)

I was hoping that by tagging them, one of the Optimizely support staff would look into it.  If the system does not currently support it, this is definitely something they would want to look into, to make sure that their product works with the latest specs (no matter how loose those specs may become).

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
Breana_Eads 12-19-16
 

Re: Experiement not working (variation not showing)

Thank you @JasonDahlin for tagging me in this post so I could follow up.

 

What I notice when I open this experiment up is an issue with the ID of the element being selected:id="/sv_SE/payment/buyAccess/subscription/planName"  the "/" in the naming of this selector is what I believe to be causing the problem.  Each selector is passed through an javascript escape function, then the variation code is passed through an escape function as well.  Because of these security steps, an element that uses "/" in its id can cause problems.  To avoid issue when using Optimizely I would use selectors that do not have the "/" used in the naming convention. 

 

As for the explination for why $ did not work but jQuery did,  I think is a scope issue.  When testing the scope on your page, I found that $ undefiend, however if optimizely.$ is typed into the console optimizely.$ is defined.  This points at the fact that $ is not scoped to the window.  Using jQuery works because it is more specific in the calling of the libary and is defined outside of Optimizely.

 

Hope that helps. 

Breana Eads
Optimizely