How to Make New vs Returning User Data Available

Prerequisites

Prerequisite #1: You must be upgraded to our Shopify Source

If you have installed your Shopify source before December 11, 2023 you'll need to make an update to make the new vs returning user data available for your marketing destinations. This update adds "customer_order_count" parameter to the dl_purchase event allowing us to determine if a user is new or returning.

If you are not upgraded to our Shopify source, upgrade now and this data is included! Follow our upgrade guide.

Prerequisite #2: You are not using Thank You Page Extensibility

To be clear you can be using Shopify's Checkout Extensibility, just not the Thank You Page Extensibility feature of that. Review our Shopify's Thank You & Order Status Page Extensibility FAQ guide to understand more about these features.

Changes you need to make

Step 1: Update your Order Status Additional Scripts

We are going to reset your Order Status Additional Scripts the unmodified version.

1. Remove your previous version of script before adding the new

In Shopify navigate to Settings, and then Select Checkout Settings. Scroll to the Order Status page section. You'll add the code as instructed below to this section.

Not sure where you code begins and ends? Looks for the comments <!-- Begin Elevar --> and <!-- End Elevar --> to mark the start and end of the scripts you'll be removing.

Not seeing the comments? You may have added our script before we begin included the comments. Here is an example of the script you are looking for. The identifiers will be different for your specific store, but use this as a guideline. If you are still not sure where your script begins and ends, send a file of your entire order status page additional scripts to our support team and we can help you out.

2. Find your script in your Elevar App

Access your Shopify Source in Elevar App.

Navigate to My Tracking and Select you Shopify Source

Select the Configure Order Status Page Step and follow the steps on this page

3. Add the new script in your Order Status Additional Scripts

Paste the code you've copied from above into the Order Status Additional Scripts.

Save your update.

Step 2: If you have previously added post-purchase upsell tracking, updates are needed!

Follow this guide starting at Step 2, to update your post-purchase upsell tracking to avoid purchase duplication.

Step 3: Update your web tags for Facebook and Snapchat

Server-side purchases will automatically start passing the new vs returning user data, however the web tags in Google Tag Manager (GTM) need to be updated for Facebook and Snapchat.

Done!

Updates you can expect to see:

GA4Server-side purchase event will automatically start passing the following user parameters: totalorder_count & customer_type (either New or Returning). You must set 'totalorder_count' and 'customer_type' as a custom definition for this to take effect. This is done in GA4 by going to Admin > Custom Definitions > Create Custom Dimension.
FacebookServer-side purchase event will automatically start passing the customer_type parameter. Pre-built web tags updated to pass customer_type. You must re-import your web tags for this to take effect.
SnapchatServer-side purchase event will automatically start passing customer_status parameter. Pre-built web tags updated to pass customer_status. You must re-import your web tags for this to take effect.
Impact RadiusServer-side purchase event will automatically start passing the CustomerStatus parameter.
AwinServer-side purchase event will automatically start passing the customeracquisition parameter.
RakutenServer-side purchase event will automatically start passing the custstatus parameter
PartnerizeServer-side purchase event will automatically start passing the customertype parameter.
ShareASaleServer-side purchase event will automatically start passing the newcustomer parameter.