Identify

Description

This client-side event fires whenever a customer is identified on the Shopify storefront. This primarily happens at checkout, or when a use logs in, creates an account on the Shopify store, or self-identifies with an event like the newsletter sign-up.

Instrumentation

This event is implemented with our javascript analytics library. The tracking code is managed in the storefront theme.

The tracking code is managed in two places:

  • An Identify event fires during checkout, leveraging attribution code managed in storefront checkout settings.

  • The Identify events that fire when a customer logs in or creates an account are managed in attribution code that’s included in the storefront theme.

Event Properties

Example:

analytics.identify({
  userId: 'peter@example.com',
  traits {
    addresses {
      address: {
        firstName: 'Peter',
        lastName: 'Parker',
        street: '7th St',
        city: 'Queens',
        state: 'NY',
        postalCode: '12345',
        country: 'USA'
      },
    }
    createdAt: new Date('2021-01-1T18:11:37.000Z'),
    email: 'peter@example.com',
    externalCustomerId: '48908733345342',
    firstName: 'Peter',
    lastName: 'Parker',
    phone: '+15555555555',
  }
});

Last updated