Identify Customer

Creates a new customer or updates an existing customer record.

When a customer signs up or logs into your website, you should call the identify method first. This will create or update the customer record in CrowdPower. You will also want to call this method whenever something about the customer record changes — like if they are now a paying customer, or they updated their profile on your website.

<script>
  window.cp('identify', {
    user_id: '<user_id>', // Unique user ID (required)
    email: '<email>', // Email address
    name: '<name>', // Full name (splits into first and last name)
  });
</script>

You may also include these additional properties...

<script>
  window.cp('identify', {
    ...
    first_name: '<first_name>', // First name, prioritized over name
    last_name: '<last_name>', // Last name, prioritized over name
    signed_up_at: '<signed_up_at>', // Signup date as a unix timestamp
    custom_attributes: {
      '<key>': '<value>', // Optional custom attributes
    }
  });
</script>

The preferred method for sending in custom attributes is to use snake_case for keys, and UNIX timestamps (in seconds) for date values.

Custom attributes can be formatted in the Traits section to be displayed to you as a string, boolean, or date.

Last updated