How to A/B Test Gravity Forms: Split Traffic and Track Results

16 hr ago

7 Min. Read

Share URL

This page may contain affiliate links. Please read my disclaimer for more information.

What You’ll Build

By the end of this tutorial, you will have a working A/B split test that randomly shows one of two Gravity Forms to your visitors, tracks impressions and submissions, and surfaces conversion rates so you can pick a winner. We will cover three approaches — a free custom plugin, a free third-party tool, and a premium plugin — so you can choose the one that fits your budget and workflow.

Requirements

  • Gravity Forms (any license)
  • Two Gravity Forms created and ready to test (e.g., Form A and Form B)
  • Access to your WordPress admin or a code snippet manager like WPCodeBox
  • (Optional) Gravity Forms Elite license if you want to use the premium Rocket Apps A/B/C Testing plugin

Step-by-Step Instructions

Pick one of the three approaches below. All of them achieve the same core goal — rotating between form variations and tracking results — but differ in features and setup complexity.

Approach 1: Free Custom Plugin (Most Control)

This lightweight plugin randomly displays one of two forms, tracks impressions via JavaScript, logs submissions through a Gravity Forms hook, and shows results in a WordPress dashboard widget.

Step 1: Create the Plugin File

Create a new file in wp-content/plugins/ named gravity-forms-ab-split-test.php, or paste the code into a snippet manager like WPCodeBox.

Paste this code into the file:

Note: If you paste this into functions.php, theme updates will overwrite it if not using a child theme. Use a custom plugin file or a snippet manager instead.

Step 2: Activate the Plugin

  1. Go to Plugins → Installed Plugins in your WordPress admin.
  2. Find Gravity Forms A/B Split Test Tracker and click Activate.
  3. Activation automatically creates the tracking table in your database.

Step 3: Embed the Shortcode on Your Test Page

Add this shortcode to any page or post using a Shortcode block:

[gf_ab_split_test form_a="1" form_b="2" title="false" description="false" ajax="true"]

Replace 1 and 2 with your actual form IDs. You can find the form ID in the Forms → All Forms list.

AttributeDefaultDescription
form_a(required)ID of the first form
form_b(required)ID of the second form
titlefalseShow or hide the form title
descriptionfalseShow or hide the form description
ajaxtrueEnable AJAX form submission

Approach 2: Gravity Wiz Split Tester (Free Third-Party Plugin)

If you prefer not to manage custom code, Gravity Wiz Split Tester is a free plugin available through Gravity Wiz’s Spellbook installer. It rotates between two or more entire forms via a shortcode and uses Gravity Forms’ built-in Views vs. Entries tracking.

Step 1: Install Split Tester

  1. Sign up for a free Gravity Wiz Spellbook account.
  2. Install the Spellbook plugin and authenticate your account.
  3. Browse for Split Tester and install it.

Step 2: Add the Shortcode

Paste this shortcode into any page:

[gravityforms action="split_test" ids="1,2"]

Replace 1,2 with your form IDs. You can add more than two forms by comma-separating additional IDs.

Step 3: Track Results

Gravity Forms natively tracks Views and Entries for each form. Go to Forms → All Forms and look at the Conversion % column to compare performance.

PRO TIP: Exclude your test page from caching. If the page is cached, visitors may see the same form every time instead of a random rotation.

Approach 3: Rocket Apps A/B/C Testing (Premium Plugin)

If you want automatic winner selection, statistical confidence calculation, and built-in caching support, the Rocket Apps A/B/C Testing plugin is the most robust option. It supports up to three form variations and declares a winner when the test ends.

Step 1: Install and Activate

  1. Purchase and download the plugin from Rocket Apps.
  2. Upload it via Plugins → Add New → Upload and activate.

Step 2: Create a Test

  1. Go to Forms → ABC Testing.
  2. Click Add New Test.
  3. Assign Form A and Form B (and optionally Form C).
  4. Set the Confidence Threshold (default 95%).
  5. Choose an Assignment Strategy:
StrategyBehaviorBest For
Sticky (recommended)Randomly assigns one version per visitor and remembers it across sessions.Clean, fair measurement of real visitor behavior.
AlternateRotates the form on every page load.Quick previews or ensuring equal display counts. Less precise for behavior measurement.

Step 3: Set a Run Limit

Choose when the test should automatically end:

  1. Stop after a number of submissions — Ends when total submissions across all versions hit your target.
  2. Stop after a number of days — Fixed deadline regardless of submission volume.
  3. No limit — Runs until manually stopped.

Step 4: Embed the Test

Use the Gravity Forms ABC Test block in the block editor, or paste the shortcode into a PHP template:

<?php echo do_shortcode('[gf_abc_test key="12345678"]'); ?>

Replace 12345678 with your test key from the plugin settings.

Step 5: View Results and Export

When the test ends, the plugin automatically serves the winning form to all future visitors. You can also export results at any time:

  • Download CSV — Raw data for spreadsheets.
  • Download PDF — Clean report with charts and conversion rates.

Testing and Verification

No matter which approach you chose, verify the split test is working before sending traffic to it:

  1. Open your test page in an incognito/private browser window.
  2. Refresh the page several times. You should see Form A and Form B appearing randomly.
  3. Submit a test entry on each form.
  4. Check your tracking:
  • Custom plugin: Go to your WordPress Dashboard → Gravity Forms A/B Testing Results widget.
  • Gravity Wiz: Go to Forms → All Forms and check the Conversion % column.
  • Rocket Apps: Go to Forms → ABC Testing and view the test summary.

Expected result: Each form should show impressions and at least one submission, with a conversion rate calculated as submissions ÷ impressions.

Comparison: Which Approach Should You Use?

FeatureCustom PluginGravity Wiz Split TesterRocket Apps A/B/C Testing
CostFreeFreePaid
Max variations22+3 (A/B/C)
Impression trackingCustom AJAXGravity Forms native ViewsBuilt-in
Conversion trackingCustom hookGravity Forms native EntriesBuilt-in
Statistical significanceNoneNone95% confidence default
Automatic winner selectionNoNoYes
Sticky visitor assignmentNoNoYes
Caching compatibilityManual exclusion requiredManual exclusion requiredBuilt-in support
Backend user exclusionNoNoYes
Export resultsNoNoCSV + PDF
Block editor supportShortcode onlyShortcode onlyDedicated block + shortcode

Troubleshooting

  • Same form keeps showing: Your page is cached. Exclude the test page from your caching plugin or host cache. With Rocket Apps, this is handled automatically.
  • No data in the dashboard widget: Make sure the plugin activated correctly (the database table is created on activation). Deactivate and reactivate if needed.
  • Submissions not tracked: Verify the gform_after_submission hook is firing. Some payment gateway add-ons delay entry creation, which can interfere with timing.
  • Need field-level testing: None of these tools test individual fields within a single form. For that, use Google Optimize or a dedicated CRO platform.

The Bottom Line

A/B testing your Gravity Forms is one of the fastest ways to improve conversion rates. If you are comfortable with code, the custom plugin approach gives you full control with zero cost. If you want a quick, free setup, Gravity Wiz Split Tester is solid. If you need statistical rigor, automatic winner selection, and professional reporting, Rocket Apps A/B/C Testing is worth the investment.

Start with the free option that matches your technical comfort level, run your test for at least 100–200 impressions per variation, and let the data pick the winner.

Photo of author
About the Author
Chris Eggleston
Husband. Father of 4. Grandpa of 2. Chief Problem Solver exploring business systems, technology, AI & faith — helping people solve real problems. @mantiswp @chrisegg

Support Chris - Donate $5

Gravity Wiz Add-Ons

Advertisement

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments

Related Post

How to A/B Test Gravity Forms: Split Traffic and Track Results

Learn how to A/B test your Gravity Forms by splitting traffic between form variations and tracking which one converts better — with three approaches from free to premium.

16 hr ago

7 min. read

How to Migrate From Contact Form 7 to Gravity Forms: A Step-by-Step Guide

Migrating from Contact Form 7 to Gravity Forms isn’t just about upgrading your form plugin; it’s about future-proofing your site....

Apr 23, 2026

4 min. read

How to Secure a Digital Broadcast Page with Gravity Forms Submit to Access Add-On

Live events and webinars are powerful ways to connect with your audience, but hosting them directly on your WordPress site...

Oct 3, 2025

4 min. read

Step-by-Step Guide: Sending a Gravity Forms Notification to the User

Gravity Forms notification feature allows you to send emails to users automatically when they submit a form. This is useful...

Mar 20, 2025

5 min. read

Gravity Forms Multi-Date Picker

Gravity Forms is a powerful form builder, but you might occasionally find some limitations. For example, the date picker field...

Nov 13, 2024

4 min. read

How to Migrate From WS Forms to Gravity Forms: A Step-by-Step Guide

Migrating from WS Forms to Gravity Forms can seem daunting, but with the right approach, it can be a smooth...

Oct 26, 2024

4 min. read