Why theme setup is needed for price tests
For price experiments to work correctly, Arktic’s script needs to know which HTML elements on your page display the product price and which elements display the cart line item price. The script updates these elements to show the test price for visitors assigned to the variant. This is done by looking for specific data attributes on the relevant elements:data-spt-price— the element showing the product price on the PDPdata-spt-cart-price— the element showing the line item price in the cart (drawer or page)
These attributes are only used by Arktic’s script and have no effect on your theme’s appearance or behaviour. They are safe to add to any theme.
Supported themes (automatic setup)
The following Shopify-owned themes are fully supported out of the box. If you are using one of these, no manual setup is required:Dawn
Sense
Craft
Crave
Colorblock
Refresh
Studio
Origin
Spotlight
Ride
Expression
Habitat
Presence
Publisher
Manual setup for custom and third-party themes
You need to add two data attributes to your theme’s Liquid files. This is a one-time change.What you need
A developer (or you, if you are comfortable editing Liquid). The changes are small and non-breaking — they only add an attribute to an existing element.Step 1: Add data-spt-price to the product page price element
Find the element in your theme that displays the product’s price on the product detail page (PDP). This is usually in a file like sections/main-product.liquid or snippets/price.liquid.
The element typically looks like this (or similar):
data-spt-price attribute:
- On a product page, right-click the price and select Inspect in your browser
- Look for the element that contains just the price number (not a wrapper
div) - Find that element’s class name in your theme code using the Theme Editor’s Edit code view
Step 2: Add data-spt-cart-price to the cart line item price element
Find the element in your theme that displays the price for each item in the cart. This may be in your cart drawer (sections/cart-drawer.liquid) and/or your cart page (sections/main-cart-items.liquid or similar).
The element typically looks like:
data-spt-cart-price attribute:
Step 3: Save and verify
- Save your changes in the Theme Editor
- On a product page, open the browser console and run:
This should return your price element. If it returns an empty NodeList, the attribute is not on the right element.
- Add a product to cart and open the cart drawer or cart page. Run:
This should return one element per cart line item.
Page builders
If your product page is built with a page builder app (Replo, PageFly, Funnelish, GemPages, Shogun, or similar), the price element is rendered by the page builder with its own markup. You will need to adddata-spt-price through the page builder’s interface.
| Page builder | How to add custom attributes |
|---|---|
| Replo | Select the price text element → Settings panel → Custom attributes → add data-spt-price |
| PageFly | Select the price element → Advanced tab → Custom attributes → add data-spt-price |
| GemPages | Select the element → Settings → Custom class/attributes section |
| Shogun | Use the Custom HTML element to wrap the price and add the attribute |
| Funnelish | Custom HTML widget |
Cart drawer vs cart page
Many themes have both a cart drawer (slides out from the side) and a cart page (/cart). Both may display line item prices. To ensure prices update correctly in both places, add data-spt-cart-price to the price element in both.
If your theme only uses a cart drawer, only that file needs the attribute. If it only uses the cart page, same applies.
Verifying a price test is applying correctly
To check whether the price update is working for a specific experiment:- Clear your
spt_asgncookie (or open an incognito window) - Navigate to the tested product page
- Open the browser console and run
window.__SPT_ASGN__ - If you are assigned to the test variant, the object will include your experiment ID mapped to the variant ID
- The price shown on the page should match the test price configured in the experiment
data-spt-price attribute is either missing or on the wrong element.