Gutenberg
Using Optibase with the WordPress Block Editor (Gutenberg) is a simple way to optimize your pages. Because Gutenberg does not support custom HTML attributes by default, this guide includes the extra step needed to tag your blocks correctly.
1. Prerequisites
Before you start, ensure you have the following installed:
Optibase WordPress Plugin: Connects your site to your workspace.
Attributes for Blocks Plugin: A free utility (linked in our dashboard) that allows you to add custom attributes to standard Gutenberg blocks like buttons and sections.
2. Create Your Test in Optibase
In your Optibase Dashboard, click Create Test.
Name your test: (e.g.,
Button Test).Select Type: Choose A/B Test and click Next.
3. Set Up Your Conversion Goal
Name the conversion: (e.g.,
btn).Type: Select Click.
Count once per user: Keep this checked for most leads/sign-up tests.
Click Create Conversion.
Copy the Goal Attribute: data-optibase-click-conversion-id="btn"
4. Tag Your Gutenberg Blocks
Open your WordPress page editor and create the two buttons (or sections) you want to test.
Select the first button: Go to the Advanced tab in the block settings sidebar.
Add Attributes: Under "Additional Attributes," add the following:
Goal:
data-optibase-click-conversion-idwith valuebtnTest ID:
data-optibase-test-idwith valuebtn-testVariant ID:
data-optibase-variant-idwith valuebtn1
Select the second button: Repeat the process, but change the Variant ID value to
btn2.
[Image: Gutenberg sidebar showing the Advanced > Additional Attributes section with Optibase tags]
5. Launch and Verify
Once your page is saved and published:
Return to Optibase and set the test status to Active.
The "Single Button" Check: Visit your live page. If only one button is visible, the script is working correctly and hiding the other variant.
Live Verification: Perform a test click on your button and check the Results tab in your dashboard. You should see the "Tested User" and "Conversion" counts update almost immediately.
Pro Features
Auto-Stop: Configure your test to automatically end when a specific conversion rate (e.g., 9%) is achieved.
Targeting: Use Restrictions to only run the test for users on specific browsers or in certain geographic locations.
Data Accuracy: Use the IP Blacklist in Workspace Settings to exclude your own office traffic so your test results remain pure.
Domain Whitelist: Secure your account by ensuring your tracking script only runs on your authorized domains.
Last updated