How to A/B Test with the New AddThis Dashboard

With the new AddThis dashboard it’s easy to change the look and feel of your AddThis tools without making code changes. So the next question is: how do you know which tools perform the best? The modern way of figuring this out is to do A/B testing.

addthis-sharing-sidebar-button-dashboard

A/B testing means showing showing different users two different versions of the site while measuring performance. This gives you hard numbers to back up a design decision, rather than just hunches. Here are steps to help you through your first A/B test using your new dashboard.

Step 1: Create a Profile

The first thing you’ll need to do to start A/B testing with AddThis is to create two profiles. To do this, go to your settings and click the “Add Profile” button, and create another profile.

Creating a Profile

Step 2: Switch Profiles for Users

Now that you’ve got two profiles, you’ll need to switch the profiles for users who visit your site, which you could do with JavaScript. You could randomly select which profile on every page load, but that could be confusing for users who travel around your site. But with the localStorage option in modern browsers, settings from one page can persist, and users will see the same tools on each page load giving you better data to make a decision.

Here’s a snippet of code to add to your page to randomly choose a profile ID and store that in localStorage, then set it for the AddThis tools:

<script type="text/javascript">
var abtestname = document.location.hostname + "_addthis_test";
if (localStorage.getItem(abtestname) === null) {
  // Replace these values with the IDs of the profiles you'd like to test
  // You can get those from http://www.addthis.com/settings/publisher
  var pubID1 = 'ra-42fed1e187bae420';
  var pubID2 = 'ra-187bae42042fed1e';

  if (Math.floor(10*Math.random())%2 == 0) {
    localStorage.setItem(abtestname, pubID1);
  } else {
    localStorage.setItem(abtestname, pubID2);
  }
}

// Read the value from localStorage and set the profile ID
var addthis_config = addthis_config||{};
addthis_config.pubid = localStorage.getItem(abtestname);
</script>

Step 3: Watch the Results Roll In

Let the the test run for a period of time, generally a week to a month depending on how much traffic you have, and then examine the results. See which one has the most shares and follows. Maybe the other has more recirculation based on content recommendations. Figure out what worked best and adjust the settings in your dashboard to the best fit.

Step 4: Clean Up

Once you’re done with the test and have chosen your preferred design, replace the code above with this:

<script type="text/javascript">
// This will clear the localStorage value for the test
var abtestname = document.location.hostname + "_addthis_test";
if (localStorage.getItem(abtestname) !== null) {
   localStorage.removeItem(abtestname);
}

// Read the value from localStorage and set the profile ID
var addthis_config = addthis_config||{};
addthis_config.pubid = 'ra-42fed1e187bae420'; // Replace this with the ID of the profile you've chosen
</script>

That’s it! Now you know for certain the AddThis tools you chose for your page are the ones that will get the most traffic based on your content and visitors. It’s good to run this sort of test every year or so to make sure you’re getting the most out of our tools. Email us if you have any questions.

Have you conducted any A/B tests like this before? Tell us in the comments!

  • http://www.hijos-del-atomo.com/ Christian Orellana

    Very useful stuff, thank you!

  • http://addthis.com/ AddThis

    Looks like you’re using two different types of buttons, but it might be easier to explain over email. Can you send us a message to help@addthis.com?

  • http://www.androidappania.com/ Android Appania

    OK, I have Sent you an Email to help@addthis.com, Containing Copy of Above Comment !

  • http://www.promozseo.com/ Soumya

    Do you provide supports to your free account holders? Actually I am facing some problems. Whenever I am refreshing my website and blog the addthis plugings are not appearing most of the time on my site, not the share button, not the follow button and not even the recommended contents. So what to do for this? Can you give me any solution which will solve this issue? My website http://www.promozseo.com/

  • http://addthis.com/ AddThis

    We’re guessing it might be an ad blocker on your browser that’s causing this issue, since we can can see all the buttons after refreshing several times.

  • http://addthis.com/ AddThis

    Let us know if you try this!