Skip to main content

Overview

Show different prices to different visitors on live traffic to find which price sells best.

Written by Shashank Agrawal

A price test shows one group of visitors your current price and another group a different price, then measures which produced more revenue. Your Shopify prices are never changed while the test runs — the adjustment is applied per visitor.

What your store needs

  • Shopify Plus. The price a customer is charged is applied by a Shopify Cart Transform Function, which is a Plus-only feature. Without it a visitor would see the test price and be charged the normal one.

  • The Cooee app embed enabled. The theme app extension assigns each visitor to a group and hands that assignment to the storefront and the cart.

  • Price elements tagged in your theme. Cooee rewrites only the elements you have marked with data-lc-price-*. This is one-time work per theme — see Setting up price testing.

  • Products published to the Online Store. A product that is not published cannot be selected for a test.

Multi-currency stores are supported, with one caveat on fixed-amount adjustments covered below.

How it works

The single most useful thing to understand is that the price a visitor sees and the price they are charged travel by two different routes.

1. You publish the test

Cooee gathers every published price test for your store and syncs them to Shopify together. It first makes sure the Cart Transform Function exists, and only then writes the test data.

If the function cannot be created, the sync clears everything and stops. That is deliberate: showing a test price that checkout would not charge is worse than showing no test at all.

2. A visitor is assigned to a group

When a visitor loads a page, Cooee decides which group they belong to for each active test. That decision is:

  • Deterministic — derived from the visitor's ID combined with the test ID, not a coin flip per page. The same visitor always lands in the same group.

  • Made once — stored in the browser and reused, so an enrolled visitor stays on their price for as long as the test runs.

  • Subject to your audience rules — a visitor who does not match a test's filters is not enrolled and sees normal prices.

A visitor can be enrolled in more than one price test at a time. If the same product appears in two tests they are enrolled in, only one adjustment is applied — adjustments never stack. Even so, putting one product in two concurrent tests makes both results unreadable, so avoid it.

When a test stops, its stored assignment is dropped on the visitor's next visit rather than lingering.

3. The displayed price is rewritten

Cooee reads the assignment and rewrites the price elements you tagged, wherever they appear on your store.

The base price comes from the data-lc-price-v value Shopify rendered into the element itself, so the adjustment is applied to the exact price that visitor would have seen — the right variant, in the right currency. Because nothing has to be fetched first, the correct price is in place immediately rather than replacing the old one a moment later.

Cooee also keeps the compare-at price and any savings label coherent with the new price, and watches the page so content loaded later — quick view, infinite scroll, variant switching — is handled too.

4. The charged price is applied at the cart

Displaying a price is not enough — the shopper has to be charged it. When a cart is created, Cooee writes the visitor's assignment onto the cart, and the Cart Transform Function reads it and adjusts each line price.

This runs on Shopify's side, so it holds through checkout regardless of the browser. This is why Plus is required — the display half works on any plan, the charging half does not.

5. Results are aggregated daily

A nightly job reads the sessions in each group and produces per-day, per-arm and per-product numbers: views, add-to-carts, removals, orders, units sold and net sales. These appear on the Overview, Daily report and Product report tabs.

Multi-currency stores

Both halves operate in the visitor's presentment currency by design. The displayed price is adjusted from the value Shopify rendered for that visitor, and the Cart Transform Function adjusts the cart line's own amount.

The caveat is fixed-amount adjustments. A percentage is currency-agnostic — "10% off" means the same everywhere. A fixed amount carries no currency, so a rule saying "reduce by 200" is applied as 200 of whatever currency the visitor sees: ₹200 off for one, $200 off for another.

On a multi-currency store, use percentage adjustments.

Audience targeting

By default every visitor is eligible. You can narrow a test to visitors who arrived via a specific landing page URL or path, or a specific UTM source, medium or campaign.

The filter is evaluated against the session's landing page — where the visitor entered your site — not the page they are on now. Someone who arrives from a campaign and then browses the store stays in the test for that visit.

Keep visitors in the test once they qualify changes what happens on a later visit. By default a visitor is in the test only while they still match the filters, so someone who arrives from a campaign today and returns directly tomorrow sees normal prices. Turn it on and they keep the test price for as long as the test runs, however they return.

Leave it off for a clean read on one campaign's traffic. Turn it on if you care about the full purchase journey, including people who come back later to buy.

Effect on the rest of your store

  • Your Shopify product prices are not changed while a test runs.

  • Sales channels and feeds continue to show your normal price.

  • Anything rendering prices outside your tagged storefront elements — email flows, third-party widgets, apps with their own price logic — shows the normal price.

Did this answer your question?