How to Add Plerdy A/B Testing Code to Shopify

Tatiana

Want more conversions?

Stop guessing — fix what’s killing them in minutes. Install the Plerdy Chrome extensions: SEO Analyzer + UX Testing. Instant SEO insights, AI audit with prioritized fixes, predictive heatmaps & scroll maps, and quick UX actions that actually move the needle.

Want to run A/B tests on your Shopify store? You’ll need to add a small Plerdy tracking code to your website. Don’t worry — this takes only a few minutes and requires no coding skills.

Follow these steps.

Step 1. Copy the A/B Test Code in Plerdy

  1. Log in to your Plerdy account.
  2. Go to A/B Testing in the Conversions section.
  3. Click “Add A/B Code.”
  4. ab-code

  5. A pop-up window will appear — copy the A/B testing code shown there.
  6. ab-popup

You’ll paste this code into Shopify in the next step.

Step 2. Open Your Shopify Theme Code

  1. Log in to your Shopify Admin panel.
  2. In the left menu, go to:
    Online Store → Themes
  3. Find your active theme.
  4. Click the three dots (•••) next to it.
  5. Choose Edit code.
  6. ab-shopi

You’re now inside your theme files.

Step 3. Paste the Plerdy Code

Where you add the code depends on where you want A/B testing to work.

Option A — Add the code to ALL pages (recommended)

  1. In the left file list, open:
    Layout → theme.liquid
  2. Scroll down to the bottom of the file.
  3. Find the closing tag:   </body>
  4. Paste the Plerdy A/B code right BEFORE this tag.
  5. paste-ab

  6. Click Save (top right corner).

Done! The code is now installed sitewide.

Option B — Add the code only to specific pages

If you want A/B testing only on certain pages, insert the code before </body> inside the relevant template files instead of theme.liquid.

Step 4. Check That the Code Is Installed Correctly

Now let’s make sure everything works.

  1. Open your website in a new browser tab.
  2. view-ab

  3. Go back to Plerdy → A/B Testing (Conversions).
  4. Click “Add A/B Code.”
  5. ab-code

  6. In the window that opens, click “Check installation.”
  7. check-ab

You’ll see a status message confirming whether the code is detected.

That’s It 🎉

Once the status is confirmed, you can start creating A/B tests in Plerdy and improving your Shopify store’s conversion rate based on real user behavior.

Need help choosing what to test first? Product pages, CTA buttons, and checkout elements usually bring the fastest results.

Was this helpful?