A lot of conversion optimization companies out there are going to try to talk you into buying some fancy A/B testing software or hire their agency to run A/B testing for you. But for a lot of us in small organizations, the outrageous price for these services and software just isn’t doable. But fear not, I have a solution for you. And wait for it…IT’S FREE!
Setting up A/B split tests on landing pages is actually quite simple when using Google Analytics. The example I’m going to be using is testing two different headings on a webform to see which version receives the most submissions. Read on and I’ll give you step-by-step instructions for creating your first A/B split test with Google Analytics Experiments.
Creating an A/B Split Test with Google Analytics Experiments
onClick=”_gaq.push(['_trackEvent', 'Brochure Download', 'Download', 'BABC']);”
- Category = Brochure Download
- Action = Download
- Label = BABC
To learn more about the structure of this code, check out this Event Tracking post from the Google Developers blog.
Now for setting up your actual A/B test:
- Log in to your Google Analytics dashboard and select “Behavior” on the left.
If you haven’t created a Google Analytics account yet, check out a recent blog post with complete instructions on Creating a Google Analytics account.
- Once you’ve opened the Behavior drop-down, choose “Experiments.”
- Once you’re inside Experiments, you’ll need to select “Create experiment” to get started.
- Name your Experiment and then choose your objective. For this test, you’ll need to choose “Create a new objective.”
- You’ll be taken to the “Goals” screen where you’ll need to name your goal and choose the type of goal. Since we are testing clicks on a webform, we’re going to select “Event” as the type of goal and then click “Next step.”
- After you create your goal, you’ll remain in the Goals menu, so you’ll need to go back to Experiments.*Note: Take a look at what is listed under “Id” next to the name of your goal in the Goal’s list before you leave. You will need that information in a little bit.
Select “Reporting” on the top navigation to get back to your Experiments window.
- Select your Experiment under “Experiment Name” to continue editing you A/B test.
- Now that you’ve created your Goal you can select your metric as the objective for this experiment. This is where knowing what is listed under “Id” next to the name of your goal in the Goal’s list comes in handy.
I know that my goal was “Goal Set 1” and “Goal ID 5.”
Select the percentage of audience to include in the experiment and then click “Next Step.”
- This is the part of your A/B test configuration where you can choose both versions of the page you want to test against each other. Paste in the URLs of both versions of your page and name each version. Since we’re testing headline copy on webforms, I’m going to name the page based on the differences in the copy. Once you’ve put in the URLs of both landing page variations and named each version, click “Next Step.”
- The final step in setting up your A/B landing page test is deciding how to set up the experiment code. You have two options: You can either manually insert the code yourself, or send the code to your webmaster. I’m going to select the option to manually insert the code myself and then I’ll show you where to put it on your landing pages.
You’ll then be given a giant script to add to your landing pages:
This code will need to be added immediately after the opening <head> tag at the top of your original landing page.
*Note: This can be confusing. You need to make sure that your Google Analytics Tracking code is on both pages, but the experiment code only goes on one page. This is also reviewed in my previous post about creating a Google Analytics account.
Make sure you upload your changes once you’ve added this code to your original page. Once you’ve uploaded your changes, click “Next Step” to validate the code, review your A/B test configuration and run the experiment.
Voilà! You’ve set up your first A/B landing page test. Happy testing! Now go impress everyone with how smart you are!