Divi
Setting up A/B tests in WordPress using the Divi Builder is a seamless process with Optibase. By using Divi’s built-in "Attributes" panel, you can easily define your variants and track performance without writing custom code.
1. Create Your Test in Optibase
Navigate to your Optibase Dashboard and click Create Test.
Name your test: For example,
Button Test.Select Type: Choose A/B Test (used for testing multiple versions of an element on the same page).
Click Next.
2. Define the Conversion Goal
A conversion is your "marker of success"—the specific action you want users to take.
Click Create Conversion.
Name it: e.g.,
btn.Type: Select Click (the most common goal for button tests).
Count once per user: Check this if you are an agency or lead-gen site where one conversion per person is standard. Leave it unchecked for e-commerce.
Click Create Conversion.
Copy the Goal Attribute: data-optibase-click-conversion-id="btn"
3. Tag Your Elements in Divi
Open your page in the Divi Builder. Ensure you have both variants of your element (e.g., a Green Button and a Pink Button) ready on the page.
Step 3a: Add the Conversion Attribute
For both buttons:
Open the Button Settings > Advanced > Attributes.
Click Add Custom Attribute.
Attribute Name:
data-optibase-click-conversion-idValue:
btn
Step 3b: Add Variant and Test IDs
Create your variants in the Optibase Dashboard (e.g., green and pink) and add the following attributes to each specific button in Divi:
Attribute
Value for Green Button
Value for Pink Button
Test ID
data-optibase-test-id="button-test"
data-optibase-test-id="button-test"
Variant ID
data-optibase-variant-id="green"
data-optibase-variant-id="pink"
4. Launch and Verify
Once your attributes are saved and the Divi page is published:
Return to Optibase and set the test status to Active (or Scheduled for a future date).
The "Single Variant" Check: Visit your live page. If you only see one of the two buttons, the Optibase script is working correctly and hiding the other variant.
Live Verification: Perform a test click on the visible button. Check the Results tab in your dashboard; you should see the conversion tracked immediately.
Advanced Dashboard Features
Targeting & Restrictions: Narrow your test audience by location, device type (Mobile vs. Desktop), OS, or browser.
Site-Wide Analytics: Monitor your overall traffic trends to see which devices and locations are driving the most engagement across your entire project.
Agency Workspaces: If you manage multiple clients, create separate Workspaces for each. This keeps data, billing, and team members organized and isolated.
Export Functionality: Need to present data to a client? You can export your raw test results directly from the settings tab.
Last updated