1. Funnel events

User login event

The user login event (user:login) must be sent when a user logs in to the system. This event is used in linking a real user ID to a uuid to help in more advanced user personalization use cases, such as cross-device personalization.

The following table lists the properties of the user login event:

NameTypeDescriptionValue
typestringRequired.

Type of the event.
user
namestringRequired.

Name of the event.
login
value.context.userobjectRequired.

User object that contains permanent user information. Used to build a user profile and map a temporary ID (uuid or user_id) to the user's permanent identifier. Enables cross-device personalization.
n/a
value.context.pageobjectRequired if the site is set up with locale configuration.

Adds page-specific information (including locale information) under page object.
n/a
value.user (deprecated)objectOptional.

User object. value.user is deprecated. We recommend that you use value.context.user for permanent user information.
n/a
value.user.addn_attributes (deprecated)objectOptional.

Additional user attributes, such as gender, preference, store code, and so on, that helps in personalization. This could include membership type, loyalty program ID, user profession, and so on. value.user is deprecated. We recommend that you use value.context.user for user information.
n/a
value.user.address (deprecated)objectOptional.

Physical address of the user. Used to derive location affinity. value.user is deprecated. We recommend that you use value.context.user for user information.
n/a

Sample event specification

The following is an example of a user login event object. This example is in the new format, which means it contains a context object.

{
  "type": "user",
  "name": "login",
  "value": {
    "context": {
      "user": {
        "id": "user-1234",
        "email": "[email protected]",
        "eid": "<hash_of_email>",
        "fbid": "<facebook_id>",
        "address": {
          "address_line_1": "123 Main Street",
          "address_line_2": "apartment 123",
          "state": "CA",
          "zip": "90210",
          "country": "US"
        },
        "gender": "female",
        "groups": [
          "group1",
          "group2"
        ],
        "addn_attributes": {
          "email_subscriber": "True",
          "preferred_sizes": [
            "S",
            "M",
            "32W",
            "30L"
          ],
          "home_store_code": "4321"
        }
      },
      "page": {
        "locale_country": "<country code, 2 letters, lowercase, e.g. fr>",
        "locale_language": "<language code 2 letters, lowercase, e.g. en>",
        "locale_currency": "<currency code, 3 letters, lowercase, e.g. eur>"
      }
    }
  }
}
If you have suggestions for improving this article, let us know!