Step 2: Tag product prices
Introduction
To enable Intelligems to dynamically modify price elements for each test group during testing, it is essential to tag their locations on your website. This entails adding the query selector for price elements into the Intelligems configuration so the Intelligems plugin knows where those prices live. This guide will walk you through the process to do so.
Before you can use the Intelligems Widget, please confirm that you've added Intelligems JavaScript as a source into your theme.liquid file! See more on how to add our JavaScript to your site here.
Step 1: Accessing the Widget
To get started, you'll need to create a price test in the Intelligems app, and open the Intelligems preview widget for that test. There are two ways to access the Intelligems Preview Widget:
Navigate to the "Tests" tab in the Intelligems app. Click on the eyeball icon to the right of the Price Test you have created. This will open a new browser window up with your website with the widget enabled.
You can also enter this mode by adding /?ig-preview=true to the end of your website's URL (e.g. https://mystore.com/?ig-preview=true). This will open a modal where you can choose which experiment you would like to see in the onsite widget. To tag prices, be sure to select a price test from this dropdown.
Once you are in Preview mode, select the "Edit" button followed by the dollar sign. The video below will walk you through this process:

Step 2: Adding Price Selectors
Now that you are in Edit mode, it is time to tag price elements everywhere on your site. Follow the steps below:
Enable price tagging mode - Click the $ icon in the edit widget
Enable price selector mode - Click the box labeled 2 in the image below
Tag price elements - Move your cursor to see blue dotted lines around page elements. Click a price element to add it to the query selector list. Click Save to highlight the element:
Green = product is in the test you are currently previewing
Blue = product is not in the test you are currently previewing
If the price for a product in your test is highlighted in blue, Intelligems can't identify the product or variant ID - see this guide for the required theme change
Tag all prices - Add query selectors to the correct section (compare at price for strikethrough prices, price for regular prices, etc.) for all prices on your site, except for products added to your cart or your checkout page
Save your work - Click Save periodically to avoid losing progress

You'll know you're done when all price, compare at price, installment and savings elements are highlighted in blue or green on all pages in your store!
Note that you should not tag prices in the cart or cart drawer as we will manage updating those using Cart Transform Functions.
Last updated
Was this helpful?