How Can I Trigger Tags in GTM if a Shopper is New vs Returning Purchaser?

Want to trigger certain tags to fire in GTM if a purchaser is a new vs returning shopper?


Data Layer 1.0. has been depreciated

Please follow our upgrade guide to update to our latest version.


It can be very impactful for businesses to analyzing data based on if a user is a new or returning customer. Or to retarget first time purchases vs returning purchasers differently.

This is why many merchants want to trigger tags in GTM to fire only if a shopper is a first time purchaser or to only fire if a shopper is a returning shopper.

Is This Possible?

The short answer is no.

It used to be possible. Shopify previously have a value in it's Thank You Page liquid that shared the total order count of a purchaser. This allowed you to infer if the shopper was new or not - e.g. if Total Order Count = 1, it's a new purchaser.

What was great about this is that this value would populate if a shopper used a known email address. It did not rely on the shopper being logged into their account or not. So if the shopper didn't log in, but make a purchase with an email address that is in your Customer section in Shopify, Shopify would share the total order count associated with that email address.

This liquid parameter was sunset by Shopify.

Shopify has added an OrderCount parameter to their Web Pixel API [Documentation]. However, this value only populates if the user is logged into their account. It won't populate a value if a user is not logged in but makes a purchase with a known email address.

Since most merchants see less than 1% of their traffic log into an account on their websites, this does not give an accurate representation of if a shopper is a new or returning customer.

We're still in contact with Shopify about how important this data is to merchants and how to make this data more actionable to merchants. We hope to have a better 1 to 1 solution in the future!