Rich-text Reply

Wordpress headlines don't really change

avalentini 04-26-16

Wordpress headlines don't really change

[ Edited ]

I am testing Optimizely on a news website, we want to check how easy it would be to integrate it in our workflow and at the same time how does it perform. The website is a Wordpress hosted on our servers.

 

We set up the account, got the API key, installed the plugin, activated it, set it to immediate mode and proceded to create two new headlines. Updated the post, started the experiment. 

 

But upon visit, nothing changes. No user is shown the different headlines. Nor in the listings or inside the post itself.

 

Any reason why this could be happening? 

JasonDahlin 04-26-16
 

Re: Wordpress headlines don't really change

There are lots of reasons it may not work:

1- Optimizely not loaded on that page

2- URL targeting for the experiment is incorrect

3- You are not in the Custom Audience for the experiment

4- The code that changes the webpage is incorrect

etc.

 

Can you share the URL of the page you are experimenting with and the ID of the experiment you are trying to run?  That's all I need to see what you are trying to do and figure out why it isn't working.

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
avalentini 04-27-16
 

Re: Wordpress headlines don't really change

Hi Jason, 

 

thanks for your reply. 

 

1- Optimizely does load, the <script> loading the js comes up in the source code

2- I'm using substring and using "c-mw.net" as value. Because it's a headline test, I need the headline to change both on the home page, news page, sidebars and the post itself. My assumption was that using the substring of the website domain would have made it work everywhere.

3- No custom audience has been set up

4- don't know about this, I am just using the wordpress plugin to test headlines

 

website      http://www.c-mw.net/ 

post            http://www.c-mw.net/keeping-it-local/

ID                5735021112

 

JasonDahlin 04-27-16
 

Re: Wordpress headlines don't really change

@avalentini - The code of the experiment is trying to modify the text of an element that does not exist on the page.

 

$( ".optimizely-2004314" )

If you are trying to change the headline, you should try like this:

 

$( ".post-2004314 h1" ).text( "Proof of why taking care of local is paramount for venues" );
--Jason Dahlin
Analytics and Testing Guru Smiley Happy
avalentini 04-28-16
 

Re: Wordpress headlines don't really change

Ah. It makes sense.

 

I changed the code in the theme and I added an

id="optimizely-xxxxxx" class="optimizely-xxxxxx"

directly in the <a> / <h1> of the titles. I used both id and class just to be sure. These are into the source code now.

What I'm using in the configuration is:

$( ".optimizely-$POST_ID" ).text( "$NEW_TITLE" );

but probably I'm still missing something.

 

 

 

JasonDahlin 04-28-16
 

Re: Wordpress headlines don't really change

@avalentini - Congratulations, it's working!

 

I placed myself into variation "5744781391" and I see the headline "These venues really care about their local environment".

 

And, in variation "5748521425", I see the headline "Proof of why taking care of local is paramount for venues".

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
avalentini 04-28-16
 

Re: Wordpress headlines don't really change

Yep, I think adding an option with h1 and an option with a after the post-id made the trick!