Target an experiment or personalization to product pages of certain price

Issue

When testing in e-commerce sites, the opportunity might arise to test certain changes only on products of a certain price, over a certain price, or under a certain price.

Solution

You can target pages with your experiment or personalization by adding a Page Tag Condition or a JS Condition to the Site Area of your experiment/personalization.

This will trigger the experience only on pages that match the price condition that you set.

First, you need to make sure that Page Tags have been implemented with the _conv_product_price variable.

  1. Targeting products that match an exact price:

    In this example, we are going to target product pages over 25.  Go into the Site Area and create and create a condition like the following:

    blobid0.png

  2. Targeting products over or under a certain price:

    Create a JS Condition like the following, adjusting the comparison operator to what you need, < (less than) or > (greater than):

    location.href.includes('products') && _conv_product_price < 25

    blobid2.png

    In this condition, it is also including the pages with the text "products" in the URL, as separate conditions are OR'ed in the Site Area.

  3. Targeting products based on a another price, besides the standard price, such a discounted price.

    Sometimes we need to target prices based on a discounted price. In this case, you need to either map the _conv_product_price variable to the discounted price, or you can also target the price based on the element displayed in the product page.

    Here is an example:

    location.href.includes('/products/') && document.querySelector('.price--highlight').textContent.replace(/\$/g,'') < 25

    blobid3.png

    In this example, we are targeting the element with the CSS selector '.price--highlight'.

    You can learn how to create a selector.
Have more questions? Submit a request
CONVERT MORE

Reliably Convert More Site Visitors, Even If Everything Else is Changing in Your Business.

START 15-DAY FREE TRIAL
✓ No Credit Card  ✓ Easy Set-Up  ✓ Access All Features

Comments