To exclude users who have made a purchase from your A/B tests on Shopify using Convert.com, follow these steps:
- 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. - 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. - Create an audience to not match the cookie and its value and append it to your experiment.
This setup helps focus your A/B tests on users who have not made a purchase, providing insights into converting these users into customers.