All Collections
Price Test
How to display conditional price to new and returning visitors?
How to display conditional price to new and returning visitors?
Leo avatar
Written by Leo
Updated over a week ago

When it comes to selling products, each store has different approaches. Some stores will have customers repeatedly visiting and making final purchases in the end. Some stores will only encounter the same customer once.

Hence, running price tests only on new or returning customers might be helpful to improve the accuracy of price testing.

This article will explain how to set up a price test with this advanced option.

How does this advanced option work?

After the visitor label script is enabled, ABConvert will start recording the first visit time of each visitor in your store. Then differentiate visitors into new visitors or returning visitors based on their labeled first visit time and the time the test was created.

  • New visitor: The labeled first visit time is later than the price test.

  • Returning visitor: The labeled first visit time is earlier than the price test.


Let’s say we enabled the script on May 10 and started the price test on May 24.

  • Visitors A and C will be new visitors as their labeled first visit time is later than the price test.

    • Visitor A has visited the store before but the visit activities are not recorded before the script is enabled.

  • Visitor B will be a returning visitor as the labeled first visit time is earlier than the price test.

How to set a up price test with the new and returning visitor filter?

Enable visitor label script

To gather more data and be ready to start using the filter in the price test at any time, we recommend keeping this script enabled.

Simply go to Online stores > Theme > Customize > App embeds, and you will find our visitor label script. Once you enable it, the script will start to label the first visit time of your customers.

Give it some time to collect data

As we mentioned above, our script starts labeling the first visit time after the script is enabled. Therefore, we suggest starting the price test at least two weeks later.

Otherwise, most returning visitors will be viewed as new visitors since their past activities are not recorded.

Set up price test with -----

In step 2 of creating the price test, you can enable the filter and edit it in the Advanced options.

[Advanced Topic] How to preview the test with the new and returning visitor filter

Preview as a returning visitor

  • Visit your store

  • Open up the dev tool of the browser by right-clicking the page, then click “inspect“

  • Navigate to the console tab and use the following command to set the first visit timestamp to Jan 01, 1970.

window.localStorage.setItem('abconvert-first-visit-time',0000000001)

  • Refresh the browser to see if the test is running correctly.

Preview as a new visitor

Simply visit your store in the incognito window, then you will be identified as a new visitor in the test.

Conclusion

If you want to test price conditionally on new or return visitors:

  1. Turn on visitor label script in the theme editor.

  2. Wait for a period of time to label visitors' first visit time. (We recommend waiting for at least two weeks.)

  3. Start the price test with the new and returning visitor filter.

If you encounter any issues, feel free to reach out to support through the intercom widget or write an email to [email protected].

Did this answer your question?