Growth & Marketing

How Twilio Segment Tracks Data with Twilio Segment

Nov 23, 2014

By Jake Peterson

Your analytics are only as good as the data you’re tracking. And deciding what to track is the hardest part about making your data useful. It’s overwhelming to create a tracking plan from scratch, so this article will give you a head start.

After discussing with hundreds of customers, reviewing best practices across all our partners, and some good ol’ trial and error, we’ve revamped Segment’s own tracking plan. We’re sharing it with you today, so you can use it as a reference.

First things first.

You should keep a few things in mind as you start building your tracking plan.

  • It’s all about the funnel. How do people discover, start using, and pay for your product? What are the most important steps along the way? These are the crucial events you want to capture.

  • Less is more. Track only the events you will use to make decisions, only the most essential pieces of information. Start with three. Seriously, three. Only add more later.

  • Get organized. Pick a convention for naming your events and properties. Your eyes, brain, and new team members will thank you later.

Core Lifecycle Events

Our customers hit three important lifecycle events as they find, implement, and pay for Segment. These lifecycle events are very similar across most SaaS companies. Here’s how we record them down as discrete events:

  • Signed Up

  • Sent Project Data

  • Started Subscription


In our own tracking plan template, we have a column called “Why?”. In the “why” column we explain the purpose for tracking each event, which forces us to focus on what’s most important and leave out extraneous data that’s not critical to our business. We’d suggest you do the same! We actually borrowed this idea from you, our customers!

Protip. We’re sticklers for formatting and consistency over here, so any new person on the team can easily search for and add new events. We suggest naming all your events with past tense verbs and capitalized letters, ex: Signed Up__. Name properties in camelcase (lowercaseCapital form) for easy reading, ex: userLogin__.

Tracking Plan

Alright, let’s dig into why and how we track each of these events.

Signed Up

The Signed Up event is the key metric for Design to see how the site is converting and for Marketing to measure campaigns. It’s a user’s first baby step of commitment.

analytics.track('Signed Up', { userLogin: 'peter-gibbons', type: 'invite', organizationId: 'aef6d5f6e' });

We differentiate organic signups and invited signups, so we can understand organic website conversion separately from internal team sharing. To distinguish between organic and invited signups we use an event property called type. We also use automatically recorded UTM parameters to differentiate users that come through paid campaigns like Adwords.

Sent Project Data

This is it folks. This is the crux of whether or not people are using our product. Have they integrated? Are they sending data? How much? To which partner integrations? Via which methods? From which libraries and platforms? It all goes here.

analytics.track(userId, 'Sent Project Data', { // project projectId: 'bce5fad577', projectSlug: '', projectCollaborators: 1,

// owner ownerId: 'aef6d5f6e', ownerType: 'organization', ownerOwners: 12,

// usage callsMonthly: 134811, callsWeekly: 22,

// methods methodIdentify: 14811, methodAlias: 1320, methodTrack: 2861, methodPage: 115819, methodScreen: 0, methodGroup: 0,

// libraries libraryIos: 13289, libraryAnalyticsjs: 121582,

// integrations integrations: 3, integrationKISSmetrics: true, integrationGoogleAnalytics: true, integrationCustomerio: true });

With this paramount event, we can measure which integrations and libraries are the most popular, bill folks according to their usage, understand how much data we’re processing, and measure our active users.

The tricky thing with this event is that it’s unique per project, but everything else is tracked per user. So we record a Sent Project Data event once a day, for each user, for every project they’re connected with that had data sent. For example, a user might be an owner or collaborator on 3 projects that sent data today, in which case we’ll send 3 Sent Project Data events, one for each of those projects.

This is a server-side event. Learn more about server vs. client side events here.

Started Subscription

We offer a 14 day free trial, so it’s important for us to capture when people actually start a plan and enter a credit card. This is the final step of the activation process.

This event should only be triggered when we immediately start billing them: credit card, plan, everything is set up. This is a server-side event as well.

analytics.track(userId, 'Started Subscription', { ownerId: 'aef6d5f6e', ownerType: 'organization', ownerLogin: 'initech', ownerEmail: '', planName: 'Startup', planId: 'startup-$79-1-month', });

Phew! That’s our three core funnel events. These are the most essential events to help us determine the health of our business.

If you’re just getting started, we recommend you check out our template for a basic tracking plan here. Like I said before, start with three core events.

If you’re an analytics wizard, read on. We’re a data company, so we couldn’t help but identify a few more events that help us make better decisions.

Getting Fancy

In addition to our core funnel, we’ve started tracking a few additional events to help us inspect user behavior around the edges of the core funnel.

  • Created Organization – Most of our revenue comes from organizations that use Segment, so it’s important for us to know when someone levels up from a personal account to an organization account.

  • Invited User – When users invite more people to their organization, it’s a good indicator that they’re engaged and serious about using the product. This helps us measure growth within organizations.

  • Enabled Integration – Turning on an integration is a key engagement metric.

  • Disabled Integration – We also want to know which integrations people are turning off, experimentation with different tools is positive engagement.

  • Debugger Call Expanded – When we see that a certain customer has used the live event stream feature a number of times, we reach out to see if we can help them debug.

  • Created Ticket – How is our support doing? How many users contact support during or after the setup process? This event helps us measure our setup guide and documentation quality as well.

Identify and Page Calls

Using Segment track calls you can easily capture interactions people take on your site. But you really want to tie this information to two other pieces of the puzzle: who is taking the action and where they are when they do it. That’s where our identify and page methods come into play.

Take a look here to learn about all of our methods.'Docs', { section: 'API Reference', topic: 'Identify Method' });

Note: The Segment page method also collects the page title__, url__, path__, referrer__, search and campaign (UTM parameters) automatically.

analytics.identify(userId, { created: '2014-06-30T16:40:52.238Z', name: 'Kanye West', email: '', login: 'kanyew', type: 'user' });

If you want all of this in a handy Google Doc, we’ve got you covered.

And remember, if you have any tracking questions or thoughts on our plan, don’t hesitate to contact us.


The State of Personalization 2023

Our annual look at how attitudes, preferences, and experiences with personalization have evolved over the past year.

Get the report
SOP 2023

The State of Personalization 2023

Our annual look at how attitudes, preferences, and experiences with personalization have evolved over the past year.

Get the report
SOP 2023

Share article

Want to keep updated on Segment launches, events, and updates?

We’ll share a copy of this guide and send you content and updates about Twilio Segment’s products as we continue to build the world’s leading CDP. We use your information according to our privacy policy. You can update your preferences at any time.