How to pass my own user identifier


A user identifier (user ID) is used by different channels (e.g. GA4) to help stitch a unique user's shopper journey/session.

Elevar's user ID is used by default, which utilizies the following:

  1. Shopify's long-lasting server-set cookie
  2. Device fingerprinting that doesn't rely on cookies

How to Pass My Own User Identifier

For special circumstances, you can provide your own function by doing the following:

Then, when any data layer event is pushed, the following user ID will be used: