
While editing a page, simple add the A/B Tester element into your page, and put different content in the test-a and test-b parts of the element.
To set up Google Analytics 4 (GA4) with your ab_variant property, you need to configure the "container" in the GA4 interface and then trigger the "assignment" in your code.
Log in to Google Analytics and go to Admin (bottom left gear).
In the Data display column, click Custom definitions.
Click Create custom dimension.
Dimension name: AB Test (this is for your reports).
Scope: Select User (this ensures it sticks to the user for the whole test).
User property: Enter exactly ab_variant (this cannot be different).
Click Save.