How Can I Exclude Users Who Have Made a Purchase from My A/B Tests on Shopify?

To exclude users who have made a purchase from your A/B tests on Shopify using Convert.com, follow these steps:

  1. Set Up the Shopify Customer Event Pixel:

    Go to Shopify > Settings > Customer Events and create a New Pixel.

    Use this JavaScript code to set a cookie when the checkout_completed event fires:

    analytics.subscribe('checkout_completed', (event) => {

    document.cookie = "purchased=true; path=/";

    });

    This code sets a "purchased" cookie when a purchase is completed.

  2. Configure Audience Conditions in Convert.com:

    Set the audience condition to Cookie "purchased" is not equal to "true" to exclude users with this cookie.

    Run the Experiment for a Defined Period:

    Ensure the experiment runs for the desired period to exclude users who purchased within that time frame.

  3. Create an audience to not match the cookie and its value and append it to your experiment.

    Audiences-tfp-fertility-com-Convert-11-01-2024_09_15_AM (1)

    This setup helps focus your A/B tests on users who have not made a purchase, providing insights into converting these users into customers.