Capture events and set up segments

The real power of Customer.io comes from using the things you know about people, and the things they do, to organize them into groups, automatically trigger campaigns, and so on.

How it works

People have data associated with them—the attributesA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages. Attributes are analogous to traits in Data Pipelines. you know about them and the eventsSomething that a person in your workspace did. Events can trigger campaigns, add people to segments, etc. You can access event properties in liquid with {{event.<property>}} they perform.

You can use this data to automatically group people into segmentsA group of people who match a series of conditions. People enter and exit the segment automatically when they match or stop matching conditions. and trigger campaigns. This helps you automate your messaging strategy, so you send messages to your audience at the right times—without having to manually update lists or trigger messages.

flowchart LR a(person assigned
attributes) b(person performs
event) a-->c{Does person match
segment criteria?} c-->|yes|d(person joins
segment) d-->e{Does this trigger
a campaign?} e-->|yes|f(person joins
campaign) b-.->|events can be
segment criteria|c b-->e

Data Index: Know your data

If you’re going to use attributes and events to group people, trigger campaigns, and so on, you should know what attributes and events are available to you.

If you’re not already aware of the data coming into your system, you can see the attributes and events in your system under Integrations > Data Index.

see the attributes and events in your system under Data Index
see the attributes and events in your system under Data Index

The Data Index shows all of the attributes in your system and a list of events performed within the last 30 days. If you don’t see an attribute or event that you think you might need, you may need to update your integration to send the right attributes and events to Customer.io!

 Find an individual’s data on the People page

If you go to People, you can click an individual person to see their specific attributes (in the Attributes tab) and events (in the Activity tab).

Segments

A Segment is a group of people in your workspace—people who share the same attributes, performed the same events, and so on. You can use segments to trigger campaigns, as the audience for a broadcast, as a goal for a campaign (e.g. you want people to join a particular segment), and so on.

You can add people to segments manually or automatically—which we call data-driven segments.

In general, you should use data-driven segments whenever possible, because they update as your audience’s data changes—they’re easier to set up and update automatically. People join and leave data-driven segments automatically based on whether they match the conditions you set.

But manual segments can be helpful when you don’t want a segment to update in real time—like if you want to maintain a static list of people you met at a conference. Unlike data-driven segments, people don’t join or leave manual segments automatically. You can add people to manual segments by uploading a CSV file, or by adding them to a segment as part of a campaign or broadcast workflow.

Data-driven segments

Data-driven segments group people based on the data you send to Customer.io, so people join the segment when they match certain criteria, and leave it when they stop matching the criteria.

These kinds of segments are an essential part of your marketing automation plans because you can use them as campaign triggers. In the same way that people join segments when they match your criteria, they can also start campaign journeys when they join your segments.

With well-defined segments, you can automate your messaging strategy and send messages to your audience at the right times—without having to manually update lists or trigger messages.

You can define data-driven segments on the Segments page.

a data driven segment based on a person's address
a data driven segment based on a person's address

You can use most of your customer’s data as segment criteria, including attributes, events, page views, and devices. You can also use metadata from inside Customer.io like when people click tracked links in emails, open messages, etc.

Example segments

Lifetime value: Imagine People have a lifetime_value attributeA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages. Attributes are analogous to traits in Data Pipelines. that you increase when they pay you. You could set up a segmentA group of people who match a series of conditions. People enter and exit the segment automatically when they match or stop matching conditions. that people join when their lifetime_value value is greater than a certain amount; for our example below, we’re using 25000.

You might trigger a campaign based on this segment to send special messages to your high-value customers!

a data driven segment based on a person's lifetime value
a data driven segment based on a person's lifetime value

High value offers: Let’s say you send events to Customer.io when your people visit high value offers on your site. You might create a segment that matches people who see the same high value offer five times in the past week but haven’t used it or made a purchase yet. The segment could trigger a campaign that sends those users a special offer or nudge that encourages them to finish their purchase.

Manual Segments

Manual segments let you define exactly who belongs in the segment, and they’ll remain there until you remove them. They’re good for keeping static lists of people—like people you met at a conference, or people who signed up for a beta program.

You can add people to (and remove people from) manual segments by uploading a CSV file or invoking our API. You can remove people from manual segments as a part of a campaign or broadcast workflow. 

Set up a manual segment and choose how you want to add people to it
Set up a manual segment and choose how you want to add people to it

Events

Events are the things that people do in your system—like signing up, logging in, or making a purchase. You can use events to trigger campaigns, as segment criteria, and so on.

flowchart LR a(person performs
event)-->b{Is the event a
campaign trigger?} a-->c{Is the event
segment criteria?} b-->|yes|d(person starts
campaign journey) c-->|yes|e(person joins
segment) e-->f{Is the segment a
campaign trigger?} f-->|yes|d

Unlike attributes, which you can set manually, events are a standard part of your integration(s) with Customer.io. You’ll need to send events into Customer.io programmatically to take advantage of your audience’s real-time activities.

Beyond their use in Customer.io, events are a typical way to pass data to other systems with Data Pipelines. For example, you might send events to Customer.io to trigger campaigns and send those same events to an analytics platform like Mixpanel.

Event data

Each event carries data with it. Data properties can provide important information about the event a person performed. For example, if you send a purchase event, you might include product_name and price properties so you know what a person bought and how much it cost.

You can use these properties in a few different ways:

Here’s an example of a signup event that includes some relevant properties.

{
  "type": "track",
  "event": "Course Started",
  "properties": {
    "course_in_series": 1,
    "course_format": "pass/fail",
    "title": "Intro to Customer.io"
  }
}

Page and Screen View Events

There are two very specific kinds of events: page and screen views. These events represent the pages (web) and screens (mobile) that your audience visits.

These events work much like other events. You can do everything you do with standard events, plus two special things:

  • Create special segments based on the pages and screens your audience visits.
  • Determine the pages/screens on which people receive in-app messages. We call these Page Rules.
Use page events to determine when and where in-app messages appear
Use page events to determine when and where in-app messages appear

 Capture page views automatically

If you use our JavaScript snippet, we’ll automatically send page view events.

Semantic events

Some events have special meaning in Customer.io or your downstream destinationsA destination is a place that you want to send data from one or more sources to. You can use your own workspace as a destination; send data to another service; or send data to your data warehouse.. We call these semantic events. You can use semantic events to perform actions in Customer.io Journeys (and other destinations).

For example, we don’t have a call from our source libraries to remove a person from your Customer.io workspace using our JavaScript source snippet. So, if you need to delete a person from your workspace, you can send an event called Delete Person.

// Remove a person from your Customer.io workspace
analytics.track("Delete Person");

Semantic events are based on the event name. You can set up your own events for any destination, but we’ve pre-defined a significant number of these events to support various destinations—so you don’t have to define them yourself if you’re just getting started. See Semantic Events for more information.

Copied to clipboard!
  Contents
Is this page helpful?