Skip to main content

πŸ”Œ Set Up A/B Test Tracking

tip

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:

  1. Activate the Web Pixel (one-time, shop-level)
  2. 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.

  1. Go to A/B Tests in the Leon app menu
  2. Look for the "Activate Pixel" banner at the top
  3. Click Activate Pixel
  4. Wait for the confirmation message
One-Time Setup

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

EventDescription
Session StartWhen a visitor arrives on your store
Page ViewsEach page the visitor views
Add to CartWhen items are added to cart
Order CompletedWhen 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:

  1. Go to your Shopify Admin β†’ Online Store β†’ Themes
  2. Find the theme and click Customize
  3. In the theme editor, click App embeds (bottom-left, gear icon)
  4. Find Leon A/B Test Tracker in the list
  5. Toggle it ON
  6. Click Save

Repeat for every theme you plan to use in A/B tests.

Both Themes Required

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:

  1. Go to A/B Tests in the Leon app menu
  2. Click Settings or look for the pixel status
  3. Click Disable Pixel
Cannot Disable During Active Tests

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