Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing shareability on social networks, I want each of my variant posts to have unique URLs.

So: How can I create three posts (each with its unique URL) and then rotate their appearance on the frontend?

But I'm not even sure if this is technically possible. Any tips on how to get started?

I've also looked at the WordPress Headline Split Tester (http://wordpress.org/extend/plugins/headline-split-tester/), but again I'm not sure if whomever clicks on their friends' shared Headline A will also go to the post with the same Headline.

I've also looked at the Premise plugin, but they seem to support landing pages only -- not posts.

Thanks in advance for any tips/suggestions.

share|improve this question
1  
+1 interesting. Will wait to see for the answers :) –  Sisir Aug 19 '11 at 18:34
add comment

2 Answers 2

You can use ShrimpTest for this. Basically, you need to reverse the test idea. You're making three separate posts, one of which will be displayed on the front page. That means that two others will not be displayed on the front page. So you're doing an exclusion.

Say your three posts have id's of 101, 102, and 103. You'd set up a test and use the manual PHP mode. Then in your index.php file (or whatever is displaying on your homepage), you'd do this:

$variant = shrimptest_get_variant( 1 ); // this will be the test number
switch ( $variant ) {
  case 0:
    $exclude = array(102,103); // show post 101
    break;
  case 1:
    $exclude = array(101,103); // show post 102
    break;
  default:
    $exclude = array(101,102); // show post 103
    break;
}

Then something like query_posts(array('exclude'=>$exclude)) or similar to modify your main query. You don't really explain in your question how you're showing these, so I can't be sure of this part.

ShrimpTest is generic. It can test anything. You just have to write the code for what you're testing yourself.

share|improve this answer
    
Thank you very much for your response, Otto. I don't just want to test the index.php/front page, though -- I'd like the ability to display variations for every individual post page. Should –  Linda Aug 21 '11 at 3:33
    
... E.g if a visitor shares a link to www.mysite.com/second-post-article-version-a-headline, the next person to visit the single post will also see version-a-headline. I think I understand what you're saying about the front page, but I'm not sure how to exclude variations on a single-post.php when the post will vary every time. (And please forgive me if I'm missing something. I'm new to plugin development, as you can probably tell.) –  Linda Aug 21 '11 at 3:40
add comment

Already available: Shrimptest

share|improve this answer
    
I already got in touch with the creator of Shrimptest, and found that his plugin isn't what I'm looking for because it does not offer unique URLs. (I ultimately want to measure shareability of different posts, which is why I don't want readers viewing a different headline than what they saw on Twitter or Facebook after they click on a link). Thanks for leaving a comment though. –  Linda Aug 19 '11 at 22:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.