Contact Properties

Drift Privacy Policy

Drift respects privacy rights and data protection laws. You may only share other people's personal information with Drift, whether directly or through third-party integrations, if you are permitted to do so under applicable law. Drift Privacy Policy

Sometimes you may find it useful to send Drift additional information about a visitor on your site. This additional information can help give your reps additional information about a visitor during a conversation or it can be used to create dynamic segments for campaigns or chat targeting.

drift.identify(userId, attributes)

If you're already identifying users on your website with a unique identifier from your own system (e.g. if they are logged in) you can use the drift.identify() method to pass additional contact properties for that user.

drift.identify(userId, {
  email: 'abcd@example.com',
  nickname: 'John Doe',
  age: 21
})

Note:

Generally you should only call drift.identify() once per page view. If you'd like to specify additional properties after the user has been identified, use the drift.api.setUserAttributes() method instead.

drift.api.setUserAttributes(attributes)

If you're not identifying users, or if want to pass contact properties without worrying about the user's identity, you can use the drift.api.setUserAttributes() method instead. You'll need to wait for the ready event before the API is ready to be called.

drift.on('ready', function() {
  drift.api.setUserAttributes({
    email: 'abcd@example.com',
    nickname: 'John Doe',
    age: 21
  })
})

Contact Properties