Skip to main content
Identify()

Documentation on how to make a custom identify call

Michael Signorella avatar
Written by Michael Signorella
Updated over 6 months ago

Identify

identify is used to identify the customer who placed an order. You should run this method after a customer has completed an order.

thoughtmetric('identify', [customerID], [properties])


  1. (required) customerID: Unique identifier that identifies this user

  2. (required) properties: javascript object of properties describing the customer



Basic Example

The most basic identify call simply sends the required fields

thoughtmetric('identify', 'john@snow.com', {
email: 'john@snow.com'
})



Detailed Customer Example

The below example sends more detailed customer spend information along with the identify event. This includes total_spent, and orders_count.

thoughtmetric('identify', '0001', { 
email: 'john@snow.com',
created_at: '2022-09-06 20:12:44 -0400',
total_spent: 55.00,
orders_count: 3,
first_name: 'Aegon',
last_name: 'Targaryen'
})



List of supported properties

Field Name

Description

Type

Required

email

Customer email

string

Required

created_at

Customer created at date

string

Recommended

orders_count

Total number of orders this customer has placed

number

Recommended

total_spent

Total amount spent by this customer

number

Recommended

first_name

Customer first name

string

Optional

last_name

Customer last name

string

Optional

company

Customer company

string

Optional

address1

Customer address line 1

string

Optional

address2

Customer address line 2

string

Optional

city

Customer city

string

Optional

state

Customer state

string

Optional

country

Customer country

string

Optional

zip

Customer zip

string

Optional

phone

Customer phone number

string

Optional

Did this answer your question?