π Set Up A/B Test Tracking
This guide covers the tracking setup. For the full A/B Testing documentation, see A/B Testing Guide.
Before creating A/B tests, you need to set up tracking to measure conversions. This involves two steps:
- Activate the Web Pixel (one-time, shop-level)
- Enable the Theme Extension (per theme)
Step 1: Activate the Web PixelDirect link to Step 1: Activate the Web Pixel
The Web Pixel tracks visitor sessions, cart additions, and orders across your store.
- Go to A/B Tests in the Leon app menu
- Look for the "Activate Pixel" banner at the top
- Click Activate Pixel
- Wait for the confirmation message
You only need to activate the pixel once. It will work for all future A/B tests.
What the Pixel TracksDirect link to What the Pixel Tracks
| Event | Description |
|---|---|
| Session Start | When a visitor arrives on your store |
| Page Views | Each page the visitor views |
| Add to Cart | When items are added to cart |
| Order Completed | When a purchase is made |
Step 2: Enable the Theme ExtensionDirect link to Step 2: Enable the Theme Extension
Each theme you want to use in A/B tests must have the tracking extension enabled.
For each theme:
- Go to your Shopify Admin β Online Store β Themes
- Find the theme and click Customize
- In the theme editor, click App embeds (bottom-left, gear icon)
- Find Leon A/B Test Tracker in the list
- Toggle it ON
- Click Save
Repeat for every theme you plan to use in A/B tests.
When creating an A/B test, both Theme A and Theme B must have the extension enabled. The test creation form will verify this before allowing you to proceed.
Verifying Your SetupDirect link to Verifying Your Setup
When creating an A/B test, Leon automatically checks:
- β Web Pixel is activated
- β Theme A has the extension enabled
- β Theme B has the extension enabled
If any check fails, you'll see a warning with a direct link to fix it.
Disabling the PixelDirect link to Disabling the Pixel
You can disable the Web Pixel when you're not running A/B tests:
- Go to A/B Tests in the Leon app menu
- Click Settings or look for the pixel status
- Click Disable Pixel
You cannot disable the pixel while an A/B test is in progress. Wait for the test to complete or cancel it first.
Auto-Disable OptionDirect link to Auto-Disable Option
When creating an A/B test, you can enable "Auto-disable WebPixel". This automatically turns off the pixel when the test completes, saving resources.
TroubleshootingDirect link to Troubleshooting
"Web Pixel not activated"
- Go to A/B Tests and click the Activate Pixel button
- If it fails, refresh the page and try again
"Theme extension not enabled"
- Open the theme in Shopify's Theme Editor
- Go to App embeds and enable Leon A/B Test Tracker
- Save the theme and click "Refresh" in Leon
"Extension not showing in App embeds"
- Make sure the Leon app is installed correctly
- Try refreshing the Theme Editor
- Contact support if the issue persists
"Pixel activated but no data"
- Verify the theme extension is enabled on your live theme
- Wait for at least one visitor session
- Check that the test is in "In Progress" status
Next StepsDirect link to Next Steps
- A/B Testing Guide - Create and manage A/B tests
- Settings - Configure your preferences