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
- Go to Plugins → Installed Plugins in your WordPress admin.
- Find Gravity Forms A/B Split Test Tracker and click Activate.
- 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.
| Attribute | Default | Description |
|---|---|---|
form_a | (required) | ID of the first form |
form_b | (required) | ID of the second form |
title | false | Show or hide the form title |
description | false | Show or hide the form description |
ajax | true | Enable 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
- Sign up for a free Gravity Wiz Spellbook account.
- Install the Spellbook plugin and authenticate your account.
- 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
- Purchase and download the plugin from Rocket Apps.
- Upload it via Plugins → Add New → Upload and activate.
Step 2: Create a Test
- Go to Forms → ABC Testing.
- Click Add New Test.
- Assign Form A and Form B (and optionally Form C).
- Set the Confidence Threshold (default 95%).
- Choose an Assignment Strategy:
| Strategy | Behavior | Best For |
|---|---|---|
| Sticky (recommended) | Randomly assigns one version per visitor and remembers it across sessions. | Clean, fair measurement of real visitor behavior. |
| Alternate | Rotates 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:
- Stop after a number of submissions — Ends when total submissions across all versions hit your target.
- Stop after a number of days — Fixed deadline regardless of submission volume.
- 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:
- Open your test page in an incognito/private browser window.
- Refresh the page several times. You should see Form A and Form B appearing randomly.
- Submit a test entry on each form.
- 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?
| Feature | Custom Plugin | Gravity Wiz Split Tester | Rocket Apps A/B/C Testing |
|---|---|---|---|
| Cost | Free | Free | Paid |
| Max variations | 2 | 2+ | 3 (A/B/C) |
| Impression tracking | Custom AJAX | Gravity Forms native Views | Built-in |
| Conversion tracking | Custom hook | Gravity Forms native Entries | Built-in |
| Statistical significance | None | None | 95% confidence default |
| Automatic winner selection | No | No | Yes |
| Sticky visitor assignment | No | No | Yes |
| Caching compatibility | Manual exclusion required | Manual exclusion required | Built-in support |
| Backend user exclusion | No | No | Yes |
| Export results | No | No | CSV + PDF |
| Block editor support | Shortcode only | Shortcode only | Dedicated 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_submissionhook 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.
