How to Do A/B Testing on WordPress With Elementor & Google Optimize

In this guide, you will learn the exact steps for running A/B tests on WordPress for free using Elementor and Google Optimize.

From landing pages to blogs, every type of website requires design decisions. 

Sometimes, website owners go with their gut, thinking less about stats and more about what they assume users might enjoy. Although it sounds more romantic, this is not the way to go about improving your user experience and boosting your conversions.

Professionals use A/B testing for a reason. It allows for decision making with the use of cold, hard stats. There’s nothing questionable about it since you compare two variations of one webpage and see which performs the best.

Luckily, A/B testing is both free and relatively simple to set up with the help of Google Optimize. Not only that, but when you utilize Elementor, you can generate landing pages on the fly and test them out without any problems.

What are the Benefits of A/B Testing

A/B testing has many purposes with many benefits. It’s an all-encompassing type of analytical testing, where you can create unique tests or run something simple like how many users visit your webpage.

A/B Testing Landing Pages

A/B testing is frequently used with landing pages, since these pages are meant to get conversions. If you pay for Google Ads that lead to landing pages, you want to make sure that those pages are ready to convert click-throughs into customers.

What’s great is that landing pages don’t take long to create with a page builder like Elementor. Then, you simply change some elements and run the A/B test for a few weeks.

Newsletter Subscriptions

Newsletter subscriptions are often located on blogs, landing pages, and eCommerce sites. It’s amazing how minor changes to an email subscription form can significantly increase your subscribers.

Contact Forms

Many companies use contact forms to obtain customers. From lawyers to contractors, and hair salons to car dealerships, a contact form is a way for customers to get information before making a purchase. If the contact form isn’t tested and optimized, you might be missing out on valuable leads.


As you may know, downloads are typically given away or sold by using buttons on a website. Therefore, an A/B test will help you discover the types of buttons to use, where to place them best; what size and color they should be. It’s all in the name of increasing those downloads and getting people to come back for more.

Important: Timing and Sample Size

One thing to remember when running an A/B test is that you can’t just have it going for a few days. A valuable test is one that runs for at least two weeks (preferably more) and accumulates enough clicks, site visits, or conversions to reveal which variation of your landing page or website is the best.

Landing Page A/B Testing In WordPress With Google Optimize

An easy and extremely powerful, way to create an A/B test for your website or landing page is to utilize the free Google Optimize tool. It has a bit of a learning curve, but it’s free and provides better results than many premium solutions you’d find online. Not only that, once you get it configured you can run an unlimited number of tests for all types of purposes.

For instance, you might want to change the color of a Call to Action button and see if that improves conversions. Or, you may want to compare different variations of a landing page and see how quickly people leave each one. Regardless of your goals, Google Optimize can help you achieve them.

So, start by going to the Google Optimize website and clicking on the Sign Up For Free button.

It asks you to link to one of your Google accounts, so if you don’t have one, that’s also part of the process. After creating your Google Optimize account, you’ll see a button called Create Experiment. There are all sorts of experiments in Google Optimize, one of which is A/B testing. Click on the Create Experiment button.
A page slides into frame asking you to name the experiment and paste in the URL of your website. Go ahead and do that, then select the A/B Test experiment. After that, select the Create button.

There are a handful of items you need to configure before launching your A/B test. First of all, set the timing for your test. Click on the Create Schedule button to do this.

It’s highly recommended that you run a test for at least two weeks, but it all depends on your needs. Sometimes one week is fine, but most of the time you’ll need longer to get the best results. I like running tests for a full month to get the best sample size of visitors. Therefore, set your scheduled start time and end time. Click on the Done button when complete.
You’ll also have to link your Google Analytics account to start tracking the visits to your website. In order to do so, click on the Go to Container Page link on the right hand side of the page.
This provides some information on how to configure and link your Google Analytics account. If you’re unfamiliar with Google Analytics, go to the website and sign up or sign in. There’s a chance you already have an account or have messed around with it before. It’s all handled under your Google Account, so try signing in with that before creating anything new.  
Once logged into Google Analytics, find the Admin button on the lower left side of the dashboard. Click on the button.
If you’re already tracking this particular website, all you have to do is create a property to get started. If you haven’t already linked the Google Analytics account to your website, make sure you Create Account before moving forward.
Creating a new account and creating a property are rather similar processes, since one property is always created when you make a new account. So, you’ll have to fill in information like what you would like to track, the account name, website name, and website URL. Make sure the time zone is accurate so that the tracking is reported properly.

Whether you’re making a new account or a property, the last step is to click on the Get Tracking ID button.

Side Note: If you’re making a property with a previously created account, you can find the Create Property button in the middle of the Admin page, as seen in the screenshot below.

After rendering the tracking code, you’ll find a Tracking ID and Global Site Tag. The Global Site tag is what you want to copy to your clipboard. You must paste this code in the section of the webpage you want it to work on. Google explains how to find this tag on your website, and sometimes all you need to do is paste the code in your theme settings or in a Google Analytics plugin. There are several methods for that, so we won’t cover them all here.

Now that you’ve created a property in Google Analytics, go back to the Google Optimize dashboard. Locate the button that says Link Property. Once again, Google provides a few links in there to walk you through the entire process. But we’ll guide you through them here as well.

Since your Google Analytics code is pasted inside the website’s tag, and you’ve made a property inside that Google Analytics account, the Google Optimize account should pull the property into the account.

Click on the dropdown that reads Select a Property. It gives you a list of the properties you currently have. Scroll down to find the one linked to your website in question.

I’m creating a landing page with the Elementor page builder. Therefore, I’d like to test out different layouts to see how many bounces I get with each layout. It’s possible that users become less interested when I start to explain a product, or maybe they like to learn about a product before seeing a Call to Action button. Therefore, I’m figuring out whether I should have the Call to Action right at the top or below some information.

When you find the right property, click on the Link button.

A popup will reveal itself asking you to add the Optimize snippet to your website. This is required, so click on the Get Snippet button.
Google then provides information on editing your Google Analytics tracking code inside your website files. This typically involves pasting a small bit of code inside that tracking code. However, you may need to walk through these steps to deploy Google Optimize while using a Global Site Tag.
You also have the option to include some code that minimizes page flickering caused by the A/B testing. Google highly recommends this, but I was having some problems with my site after implementing this bit of code. So, try it out yourself, but remember that it’s an optional step.
You also have the option to install the Google Optimize Chrome extension, which has more helpful tips on working with these bits of code.
After these steps, navigate back to the Google Optimize dashboard. Locate the Configuration heading to find the Objectives. Click on the link that reads Link to a Google Analytics View.

This part is for specifying the type of data you want to collect from this Google Analytics account. So, click on the dropdown to select a view and choose All Web Site Data.

Creating the Landing Pages You Want to A/B Test

An A/B test would be nothing without two similar, yet slightly different, variations of one webpage. For instance, you might change the location or color of a Call to Action button.

As mentioned, I’m using the Elementor page builder to construct a landing page, and I’d like to see if the Call to Action button location affects my conversion rates.

With Elementor, you can Add a New Template directly from the WordPress dashboard.

Choose the type of template you’d like to work on (in this case, a Page,) then name your template. Click on the Create a Template button to move forward.
Alternatively, you have the option to use one of the many professionally designed templates already loaded in Elementor. You can add templates directly from the builder, but I also encourage you to browse through the options in the Elementor Template Library. For this test, I uploaded a premade template from Elementor. It’s a one page landing page layout for a tech company. For this example, let’s say I’m trying to sell a new smartwatch.
What’s great about Google Optimize is that it has a visual builder for making adjustments to your website. These smaller changes are great for making tweaks, then running the different layouts in the A/B test. To set this up, go to the Variants section in Google Optimize. You can create as many variants as you want, but for this test I have the original webpage variant and one that will have the product information before the call to action buttons.

Once you create and click on one of the variants, it lets you edit them in Google Optimize.

For instance, in the screenshot below you can see that I moved the product information to the top of the landing page. The Call to Action buttons are out of the frame but they are located below the product information.

There are plenty of adjustments you can make in this section, such as changing the location or color of buttons.
Finally, go to the Objectives tab in Google Optimize. Click on the Add Experiment Objective.

This is where you specify what you’d like to measure with the test. Google Optimize has a few default objectives that you can choose from (like comparing page visits). I’m measuring the number of bounced visitors for each layout, since I want to see if having product information before the Call to Action is more likely to keep users around longer.

You can also create extremely customized objectives, which are great for seeing which buttons are getting clicked on more, or whether or not people view your videos.
After all of these elements are configured, the Start an Experiment button should become active. Once you click on that, the experiment will begin when you specified. There’s an option to stop an experiment prematurely, but once again, we recommend running it for a full two weeks or more.
While the experiment is running, Google Optimize shows how many active visitors are on each of the page variants.
You can also view the Reporting tab to reveal the results of your testing. Since my test hasn’t been going on for long there’s not much to see, but eventually it’ll start populating with the performance from each variant and how many bounces are being recorded.

The Next Level of WordPress A/B Testing

A/B testing is an essential part of figuring out which elements on your website are working the best. It takes the guesswork out of converting more customers and ensures that you’re making the right decisions in the future.

I like combining Google Optimize with Elementor, since you’re able to launch a landing page within minutes, then see which variants of that landing page are most likely to get the best results.

If you have any questions about running an A/B test or creating a landing page, let us know in the comments section below.

About the Author

Brenda Barron
Brenda Barron
Brenda Barron is a freelance writer from Southern California. She specializes in WordPress, technology, and business and founded WP Theme Roundups. When not writing all the things, she's spending time with her family.

Share on

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

you might also like

Liked This Article?

We have a lot more where that came from! Join 1,365,209 subscribers who stay ahead of the pack.

By entering your email, you agree to our Terms of Service and Privacy Policy.


37 Responses

  1. This is precisely the reason why Elementor should bake AB Testing into its feature set….yesterday. It’s one thing that seems painfully behind development.

    1. Both in terms of performance/page load speed and in terms of integrations with Analytics Adwords and other external software, it makes more sense to use an external service.

    2. I would rather have Elementor focus on what they’re best at, than learn a new field, where companies like Google, Optimizely, VWO, and others are fluent in.

    3. Yea, ok. But first they need to make me a GREEN button that will start my car, make me coffee, and get my kiddos ready for school every morning.

  2. I am not sure if this is allowed or not, thank you for doing the tutorial. There is a plug-in, I’ve been using this for the past few weeks testing it for them. It does what it says on the can.

  3. Now this is a great article. We need more like these please. How to measure and monitor your screen designs. Also would be nice if we can get a google tag manager tutorial and do more micro tests on buttons, screen scrolling etc. But this is some good content.

  4. There is another solution for split testing in elementor. There is this plugin witch is more easy to set up called “Split test for elementor”. Just take a look at the wordpress plugin diretory. You will find it there. And here for all who wanted to have a video is a small demonstration i guess:

  5. Google optimize is really good option for A/B testing, especially when you have a tight budget since it’s free (but limited) and yet it’s fully functional and really easy to use. This article should have people to do A/B testing properly, well explained article by the way.

  6. Great help!
    However, it remains not very clear for me…. In the case of landing pages, I create 2 pages and A/B tests them as stated. In the case of a page of conversion funnel that is integrated into the website, how do I make Elementor/WP choose one or another?

  7. Where this falls apart for me is using the Google tools to modify my Elementor content. It’s like slicing a tomato with an ax.

    I’d love the ability to insert a/b templates with shortcodes e.g.
    [AB Test One]
    [elementor-template id="1"]
    [elementor-template id="2"]
    [/AB Test One]

    And … are you people kidding about the video? Reading is much faster than listening to someone talk, and much easier to skim.

  8. That’s one great thing about the Elementor team. They really think about their solution before rolling out their tongue with an answer.

    An important point on this solution is that you can do way more than A/B Testing with Google Optimize. They introduced an independent solution for A/B testing, keeping elementor easy to use (which we all like), and an a competitive advantage to other services/tools.

    I’ll agree with Matan and Yoel about letting each company focus on what they do best.

  9. I think Elementor is probably not only the best value for money page builder on the market, but is also the most innovative, with every new update being a real solid improvement or adding a much needed advanced feature.

    Its like Ben and the developers are reading my mind and providing everything I need, before I even know I need it.

    Over the years I have been on beta teams for other products, but I have never been so surprised and delighted with the amount and quality of product innovation as I have with Elementor.

    Truly amazing.

    That said, this article points to a big black hole in Elementor.

    If you have to write an article this long and so detailed just to implement this functionality in Elementor (when Divi has included it from day one), then there must be several issues at play here, not the least of which being that Ben and the team have not identified A/B Testing as an important issue for us.

    I just hope I am wrong and I will see native A/B testing included in Elementor beta some day soon.

    Keep up the work guys and gals. You’re doing and outstanding job!

  10. I’ve followed this article to the T. Is there a way to test out entirely different pages in an A/B test? e.g. /var1/ vs /var2/? I can only see a way to edit minor stuff like buttons & headlines, etc.

  11. Why not just build all of this tracking directly into the plugin. This is way too much work for the average user when options like clickfunnels do it all. I really want to stay with wordpress and elementor but let’s face it developers are simply out of touch with the real needs of internet marketers and entrepreneurs in 2019.

  12. I have tried Google optimize before it is not simple it will mess up the mobile site layout and I wasn’t able to find styles to apply for break points. I think elementor should be able to do basic AB testing such as show at least two different pages based on URL query

  13. Thanks for the article. It is now a bit outdated due to UI changes on Google Optimize. WOuld be great if you could update the article. Thanks all the same

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to learn how to build better websites?

Join 1,365,209 Elementors, and get a weekly roundup of our best skill-enhancing content.

By entering your email, you agree to our Terms of Service and Privacy Policy.