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

Property

Type

Description

email

String

The customer’s email address

name

String

The customer’s name

address

Array<Address>

The customer’s address

address.street

String

The customer’s street

address.city

String

The customer’s city

address.state

String

The customer’s state

address.postalCode

String

The customer’s postal code

address.country

String

The customer’s country

allOrderIds

String

Comma-separated list of customer’s order IDs

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