When you create a Customer.io account, you get a unique
This should be included on every page in your app, just before the closing
Step 2: Identify your users
To segment users and send emails, you need to identify your users to us. To let us know exactly which users are sending data through your app, you'll need to add this
The first time
_cio.identify is called, you must send us the following:
id(that user's unique identifier)
...and we strongly recommend you also send:
created_at(a timestamp which represents when they first signed up)
But you can also send in any additional user attributes that are of value to you. In the above example we are sending the optional attributes
plan_name. You can use these attributes in the body of an email, or you can use them to segment your users.
Important things to know
- We only track activity for users registered in your app, after
_cio.identifyis called. We do not track anonymous or unregistered user activity.
- To update an existing user's attributes, just send the
_cio.identifycall again. You must include their
idand any new attribute values. If the attributes already exist in their profile, we'll overwrite them. If there are any new attributes included in the call, we'll add them to the profile.
- In addition to attributes, you may want to track custom events like "watchedIntroVideo" or "purchased". Note,
_cio.trackcalls should only be made after
_cio.identifyis called for the currently logged in user. Otherwise the events will not be associated with a known user in your account.
Here are a few examples: