# How to run an A/B test on PrestaShop

> PrestaShop has no built-in A/B testing. How to install a testing script on 1.7 and 8, avoid the cache traps, measure the order confirmation and decide what to test first.

- Source: https://bixlow.com/en/blog/how-to-ab-test-a-prestashop-store
- Language: en
- Published: 2026-11-02T10:00:00.000Z
- Updated: 2026-11-03T09:15:25.686Z
- Author: fernando
- Topics: A/B testing, PrestaShop, ecommerce CRO, product page optimization, checkout optimization, no-code experimentation
- Publisher: Bixlow

---
To run an A/B test on PrestaShop you need an external tool, because PrestaShop ships with no experimentation feature at all. The cleanest route is to install that tool's script in the store's `<head>` (from the theme, with a module that injects code into the `displayHeader` hook, or through Google Tag Manager), clear the cache, set the order confirmation page as your goal and start with the product page or the cart, which is where the purchase is decided. Below is the whole process, including the usual snags when setting it up.

## Why PrestaShop has no built-in A/B testing

PrestaShop is a store CMS: catalogue, cart, orders, carriers, payment modules. Everything else is solved with modules, and experimentation is no exception. There is nothing in the back office that looks like "create variant" or "split traffic".

For years the easy answer was Google Optimize, which was free and sat next to Analytics. Google shut it down in September 2023 and a lot of stores were left with nothing. Since then, most answers on forums point to tools built for large teams.

The reality of a small PrestaShop store is different. One or two people, an agency that built the theme three years ago and nobody wants to call again, and a list of ideas nobody has been able to check. For that situation there are two routes.

## The two options: a module or a script-based tool

**A marketplace module.** PrestaShop Addons has modules that promise A/B testing. They usually work inside PrestaShop: you duplicate an element or a page, the module splits visits and counts something. On the plus side, they install like any other module. On the minus side, they usually cover few kinds of change (a block, a text, a homepage image), they depend on compatibility with your exact version and theme, and the statistics are often a bare percentage. Before buying one, check the date of its last update and whether it states compatibility with your version.

**An external tool loaded by script.** You paste a script into the header and the tool applies changes in the visitor's browser, on top of the page PrestaShop has already generated. It does not touch the database or the store's code, so it makes no difference whether you run 1.7.8 or 8.1, the Classic theme or one bought on ThemeForest. It is the same approach Optimize used and the one we use at [Bixlow](/en/platform/ab-testing).

For most stores we recommend the script, for a practical reason: what you want to test rarely fits into "change a block". You want to move shipping costs up on the product page, rewrite the button copy, show a free shipping notice in the cart or remove a step that gets in the way. That is easier on the real page.

## How to install a script on PrestaShop 1.7 and 8

There are three correct ways. Pick one and do not mix them.

1. **From the theme.** In PrestaShop 1.7 and 8 the `<head>` lives in `themes/your-theme/templates/_partials/head.tpl`. Paste the script as high as possible inside the head. Careful: if you edit a purchased theme directly, the next theme update will wipe your change. Do it in a child theme.
2. **With a module that injects code into the header.** There are modules, free and paid, that let you paste HTML into the `displayHeader` hook, which PrestaShop renders inside the `<head>`. It is the most comfortable option if you would rather not touch files, and it survives theme updates. If someone on the team knows a bit of PHP, a twenty-line custom module hooked to `displayHeader` that returns the script tag does the same job.
3. **With Google Tag Manager.** If the store already has GTM (usually added through a module), add the script as a Custom HTML tag that fires on all pages. It is the fastest route if GTM is already there, although the script loads a little later than when pasted straight into the head, and that sometimes means the change shows up a moment late.

Then check that it loads. Open the store in a private window, look at the page source or the browser's network tab and find the script. Do it on a product page and in the cart too, not just the homepage, because some themes use different templates.

## What breaks most often: the cache

PrestaShop has several cache layers, and almost every "the script isn't showing" comes from here.

- **Smarty cache.** Under Advanced Parameters > Performance you can force template compilation and clear the cache. If you edited `head.tpl` and do not see the change, click "Clear cache".
- **CCC (combine, compress and cache).** The same screen has options to bundle and minify CSS and JavaScript. A script pasted as an external tag normally stays out of the bundle, but if you add it through a module that registers JS files, it can end up combined with everything else and load late or break. If something looks off, turn JS combining off, test, and turn it back on.
- **Full-page cache modules.** Some stores use modules that store the whole page as HTML. Clear them after installing the script.
- **CDN or hosting cache.** If you have Cloudflare or another CDN in front, or a host with its own cache (Varnish, LiteSpeed), purge there too.

The good news is that a script-based tool gets along with caching once installed. Every visitor receives the same cached page and the variant is decided in their browser. You do not have to switch anything off for the test to work, just clear once so the script appears.

## What to test first on a PrestaShop store

Do not start with the homepage. In most stores, the homepage gets a lot of traffic and decides little. What moves orders is further down.

| Area | What to test | Why |
|---|---|---|
| Product page | Shipping cost and delivery time next to the price | It is the question behind most drop-offs |
| Product page | Visible payment methods (card, PayPal, bank transfer, local wallets) | Many people decide based on how they can pay |
| Cart | A "you're €X away from free shipping" notice | Makes the threshold clear and lifts order value |
| Checkout | Guest checkout made more visible | Account creation is the classic brake |
| Shipping | An estimated delivery date instead of "24/48 h" | A date is easier to grasp than a range |

The default checkout in PrestaShop 1.7 and 8 is a single page with collapsible sections: personal details, address, shipping and payment. Many stores replace it with a "one page checkout" module. If that is your case, be careful testing there: these modules redraw parts of the page with JavaScript as the customer moves through the steps, and a change applied on load can disappear once the address is filled in. Always place a complete test order with each variant before publishing.

If you do not know where to start, the order we usually follow is shipping on the product page, the free shipping threshold in the cart, then guest checkout. They are small to build and answer real buyer doubts.

## The goal: the order confirmation

A store A/B test should be measured in orders, not clicks on "Add to cart". The click is easy to move and does not always end in a purchase.

In PrestaShop, when an order completes the customer lands on the confirmation page (the `order-confirmation` controller). With friendly URLs it usually appears as `/order-confirmation` followed by parameters, translated in other languages, and it depends on your routes under Shop Parameters > Traffic & SEO. The safe way to know is to place a test order by bank transfer and copy the URL you land on.

Two things to keep in mind:

- **Gateways that take the customer off the store.** With hosted card gateways or PayPal the customer pays elsewhere and comes back. If they close the tab at the gateway, they never reach the confirmation and that order is not counted. It happens equally in both variants, so the test stays fair, but do not expect the number to match the back office to the cent.
- **dataLayer.** If you already have a module that sends the purchase event to the dataLayer for GA4, you can use that event as the goal instead of the URL.

## Step by step with Bixlow

This is how we set it up on a PrestaShop store:

1. **Install the Bixlow script** in the head with any of the three methods above, clear the cache and check that it loads on the product page, cart and checkout.
2. **Create the goal** "Order completed" by URL (the confirmation URL you copied) or with the dataLayer event.
3. **Ask for the idea in your own words.** For example: "on the product page, below the price, show the shipping cost and the estimated delivery date". The [AI CRO agent](/en/glossary/ai-cro-agent) proposes the hypothesis and builds the variant on your live store, without touching the theme or asking the agency for anything.
4. **Review it in preview** with different products: one with combinations, one out of stock, one on sale. Nothing goes live until you approve it.
5. **Publish the test** with a 50/50 split.
6. **Wait for the verdict.** Bixlow uses Bayesian statistics and does not call a variant the winner until it has at least a 95% probability of being the best, with a minimum sample and duration. It also warns you if the traffic split has gone out of balance. If you want to know in advance how long it will take, put your numbers into the [sample size calculator](/en/tools/sample-size-calculator).

## Frequently asked questions

**Does it work on PrestaShop 1.6?**
An external script works on any version, because it only needs to be in the head. In 1.6 the head is in the theme's `header.tpl`. What changes is the modules and the checkout, which was different in 1.6.

**Will it slow the store down?**
One more script in the head always weighs something. What people notice most is not speed but the change showing up a moment late, which is why it should load at the very top, without extra hops.

**Do I need a developer?**
To install the script you need someone who can edit the theme or install a module. To build the variants with Bixlow, no.

**How much traffic do I need?**
It depends on your conversion rate and the size of the change you expect. With few orders a month, test big changes and leave colour tweaks for later.

---

## Meet our AI CRO agent

What you just read, put to work by an agent: it understands your visitors, decides what to test or personalize, builds it on your site without a developer and tells you when a result is real.

https://bixlow.com/en/ai-cro-agent
