Track events

Updated

Events are things people do in your app. They help you track your audience’s behaviors, activity, and metrics. You can use them to segment your audience, trigger messaging automations, and see how people use your app.

Track an event

The track method helps you send events representing your audience’s activities to Customer.io. When you send events, you can include event properties—information about the person or the event that they performed.

In Customer.io, you can use events to trigger automations and broadcasts. Those automations might send someone a push notification or manipulate information associated with the person in your workspace.

Events include the following:

CustomerIO.instance.track(name: "add-to-cart", properties: {"product": "shoes", "price": "29.99"});

Anonymous activity

If you send a track call before you identify a profile, we’ll attribute the event to an anonymousId. When you identify the profile, we’ll reconcile their anonymous activity with the identified profile.

When we apply anonymous events to an identified profile, the previously anonymous activity becomes eligible to trigger automations in Customer.io.

Semantic Events

Some actions don’t map cleanly to our simple identify, track, and other calls. For these, we use “semantic events,” events that have a special meaning in Customer.io and your destinations.

These are especially important in Customer.io for destructive operations like deleting a profile. When you send an event with a semantic event name, we’ll perform the appropriate action.

For example, if a person decides to leave your service, you might delete them from your workspace. In Customer.io, you’ll do that with a Delete Person event.

CustomerIO.instance.track(name: "User Deleted)
Copied to clipboard!
Version