Planning a full installation

Now that we’ve shown you Segment in action, let’s step back and think through what a full implementation of Segment for your organization would look like. We know that figuring out what events to track in Segment can feel overwhelming. You should expect this planning process to have the following steps:

Be prepared to invest time deciding with stakeholders how to track your data, and planning how you’ll analyze it. The time you spend here will save you lots of time in the future, as following Segment’s best practices allows you to easily change your tracking later.

Define Business Objectives

Tracking is about learning and taking action. Think about what you want to know about your product or customers. Think about what assumptions need to be tested and what theories need to be proven true or false. Think about the unknowns. Here are some helpful questions to get started:

  • What kind of events or data best illustrate or explain how your customers use your product?
  • How do people discover, start using, and paying for your product?
  • What are the most important steps in a customer’s journey?

While it may seem obvious, we highly recommend documenting your high-level business objectives (see the Goals tab in Google Sheet Tracking Plan template). More specifically, ask yourself: what are the measurable business outcomes you want to achieve this year? Do you want to acquire new customers? Generate more new sign-ups, drive more incremental revenue among your current customer base?

The best way to answer this question is to interview stakeholders in your organization who will consume the data.

With your business goals documented, the next step is to map user actions to those business goals. For example, if one of your goals is to activate new signups, you want to think about which activities are related to a signup. Ask yourself, what actions do people take before signing up? Do specific actions predict a user signing up?

As an example, you might end up with a list like this:

  • Ad Campaign Clicked
  • Link Clicked
  • Article Completed
  • Campaign Opened
  • From Initiated
  • Form Submitted
  • User Signed Up

While this list represents a tiny fraction of the user actions you could track, it gives a list focused on your top business objectives. This helps break up the huge project of data collection into smaller chunks.

Decide what to collect

With your business objectives documented and mapped to user actions, it’s time to build standards that you can use when deciding what to track. With your stakeholders, make a list of the actual events (page or screen views, and user actions) that you want to track. Think about all of the ways your users can interact with your site or app

When you’re first starting out, we recommend that you limit your tracking plan to a few core events, but add lots of properties to provide context about them. We generally see more success with the “less is more” philosophy of tracking data, but you might also decide to take a more liberal “track more and analyze later” approach. Like everything, each alternative has pros and cons that are important to consider especially as it relates to your company’s needs.

If you’re having trouble starting out, we recommend that you look at our free Tracking Plan spreadsheet template for inspiration. (We’ll talk more about Tracking Plans below.)

Shortcut! Check if a Business Spec meets your needs

Segment maintains several “Business Specs”, which are recommendations based on your type of business that give recommendations on what to track, what additional traits or properties to collect, and how to format them. The two most common are the B2B (business-to-business) Spec, Ecommerce Spec, and our Mobile and Video specs.

If these specs meet your business needs, you’re in luck! These specs are built into our tracking plan templates, so you don’t need to start from a blank slate.

B2B Spec

If your organization sells a product or services to other businesses, you might have different analytics and marketing needs than most companies. You need to understand your customer behaviors both at the user-level, and also at the company or team-level. You can read more about how Segment thinks about B2B tracking, and read more about the B2B Spec.

Ecommerce Spec

If your organization sells products online, the E-commerce Spec covers the customer’s journey as they browse your store, click on promotions, view products, add those products to a cart, and complete a purchase. It also provides recommendations about off-page interactions, including interactions with email promotions, coupons, and other systems. You can read more about why companies need an Ecommerce Spec, read more about Ecommerce tracking plans, and dive directly into our Ecommerce Spec.

Mobile Spec

The native Mobile Spec is a common blueprint for the mobile user lifecycle. The Spec outlines the most important events for mobile apps to track, and automatically collects many of these events when you use the Segment Android and iOS SDKs. Read more about the benefits of the native mobile spec, or read through the Native Mobile Spec directly.

Video Spec

Segment’s video spec helps you understand how customers engage with your video and ad content, including playback events, types of media displayed, and performance metrics. You can read more about our Video Spec.

Create naming conventions

Regardless of approach, here are some important best practices to keep in mind:

  • Pick a casing convention: We recommend Title Case for event names and snake_case for property names. Make sure you pick a casing standard and enforce it across your events and properties.

  • Pick an event name structure: As you may have noticed from our specs, we’re big fans of the Object (Blog Post) + Action (Read) framework for event names. Pick a convention and stick to it!

  • Don’t create event names dynamically: Avoid creating events that pull a dynamic value into the event name (for example, User Signed Up (11-01-2019)). If and when you send these to a warehouse for analysis, you end up with huge numbers of tables and schema bloat!

  • Don’t create events to track properties: Avoid adding values to event names when they could be a property. Instead, add values as a property. For example, rather than having an event called “Read Blog Post - Best Tracking Plans Ever”, create a “Blog Post Read” event and with a property like "blog_post_title":"Best Tracking Plans Ever".

  • Don’t create property keys dynamically: Avoid creating property names like "feature_1":"true","feature_2":"false" as these are ambiguous and very difficult to analyze

Got all that? Great! You’re now ready to develop a Tracking Plan.

Develop a Tracking Plan

A tracking plan clarifies what events to track, where those events live in the code base, and why you’re tracking those events (from a business perspective). A good tracking plan represents the single source of truth about what data you collect, and why.

Your tracking plan is probably maintained in a spreadsheet (unless you use our tracking-plan tool, Protocols), and serves as a project management tool to get your organization in agreement about what data to use to make decisions. A tracking plan helps build a shared understanding of the data among marketers, product managers, engineers, analysts, and any other data users.

In the next section, we share how to build a tracking plan from the ground up using a Google Sheet template. Note that you can use any tool to create the tracking plan!

Using the Tracking Plan Google Sheets template

To help you get started, we developed a Tracking Plan template in Google Sheets.

The template includes all of our Business-case (“semantic”) Specs (which we mentioned above) as tabs, including eCommerce, B2B SaaS, Mobile and Video, and a collection of common properties.

With your business goals defined, start by defining how you want to track Page/Screen, Identify and Group events. Most customers use default page tracking and skip over that tab.

The Identify tab is where you specify which user traits you intend to collect like first_name, last_name, email, etc. Read more about the identify call below.

From there, we recommend you specify Track events in the Track (Custom) tab. The template includes preexisting events with different numbers of grouped properties (1 Prop Event, 2 Prop Event, etc). While this might be more challenging to work with at first, this structure allows you to use the Minimize Rows button at the top to organize and view all events.

Once you complete the tracking plan, you can share the Google Sheet with stakeholders to review, comment, and edit, or simply to share as a reference for implementation.

Tip! If you decide to purchase Protocols in the future, you’ll be able to upload the tracking plan into Segment using the Config API.

Plan your Identify and Group calls

The Identify call updates all records of the user with a set of traits, and so is extremely important for building your understanding of your users. But how do you choose which traits to include? The example below shows an Identify call using analytics.js) for Segment:

analytics.identify({
  name: 'Jane Kim',
  email: 'janekim@example.com',
  login: 'janekay',
  type: 'user',
  created: '2016-11-07T16:40:52.238Z',
});

The traits represent dimensions in your data that you can group or pivot on. For example, in the above, you can easily create cohorts of all types that are users or accounts created within a time window of your choosing.

When you plan your deployment, think about what information you can collect as traits that would be useful to you when grouping users together, and plan how you will collect that information.

The Group call is similar to the Identify call, but it adds traits associated with a parent account to the user’s profile. If your organization is a B2B company, you should also plan the group traits to collect, and how you’ll use them once they’re applied to a user account.

Plan your Track events

We recommend starting with fewer events that are directly tied to one of your business objectives, to help avoid becoming overwhelmed by endless number of possible actions to track. As you get more comfortable, you can add more events to your tracking plan that can answer more specialized questions.

At Segment, we started out tracking these events:

  • User Signed Up
  • Source Data Sent
  • Subscription Started

Then we added some peripheral events to to better understand how we’re performing, for the following reasons:

  • User Invited 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 in organizations.
  • Destination Enabled Turning on a destination is a key value driver for our customers.
  • Debugger Call Expanded When we see that a certain customer has used the live event stream feature a number of times, we can reach out to see if we can help them debug.

For an Ecommerce company, however, the main events might be something like:

  • Account Created
  • Product Added
  • Order Completed

Tip: As we mentioned above, Segment has a set of “reserved” event names specifically for ecommerce, called our Ecommerce Spec. Check it out to see which events we cover and how they are used in our downstream destinations.

An online community, on the other hand, has an entirely different set of actions that indicate engagement, as listed below. For example, a community might want to track actions like:

  • Content Viewed
  • Content Shared
  • Comment Submitted
  • Content Produced
  • Content Curated

With these actions tracked, the community can develop metrics around engagement, and understand how users move towards their ultimate conversion events. You can read more in this article from the online community GrowthHackers about the events they track and why.

Define your Track event properties

Each Track call can accept an optional dictionary of properties, which can contain any key-value pair. These properties act as dimensions that allow destination tools to group, filter, and analyze the events. They give you additional detail on broader events.

Events should be generic and high-level, but properties should be specific and detailed. For example, at Segment, Business Tier Workspace Created is a horrible event name. Instead, we used Workspace Created with a property of account_tier and value of business :

analytics.track('Workspace Created', {
  account_tier: 'business'
})

Similar to the traits in the Identify call, the properties provide a column that you can pivot against or filter on in your analytics tools or allow you to create a cohort of users in email tools.

Don’t create dynamically generated property names in the properties dictionary. Each key creates a new column in your downstream tools, and dynamically generated keys clutter your tools with fragmented data that makes it difficult and confusing to use later.

Here is Segment’s Lead Captured Track call:

analytics.track(userId, 'Lead Captured', {
  email: 'email',
  location: 'header navbar'
  url: 'https://segment.com/'
});

The high-level event is Lead Captured, and all of the details appear in the properties dictionary. Because of this, we can easily see in our downstream tools how many leads were captured, and from which parts of the site.

If you want to learn more about how properties are used by downstream tools, check out The Anatomy of a Track Call.

Plan for destination tools

Once you’ve completed your tracking plan, there’s one more step you might want to do before you move on to actually implementing Segment. The Segment destination catalog contains hundreds of tools, many of which you’ll be familiar with already.

If your organization has an established set of analytics tools, look for those tools in the catalog and bookmark their documentation pages. These docs pages contain important information about how Segment transforms data for the destination tool, and they also contain useful details about troubleshooting, set-up, and implementation considerations.

Once you have an initial list of the destination tools your organization uses, you can also check which Segment methods those tools accept. This helps you at implementation time to ensure that the calls you use can be consumed by the tools they’re intended for.

Additionally, you should check which connection modes each tool supports, so you know ahead of time which destinations may need to be bundled.

Tip: If you know you’re looking for a tool for a specific purpose, but haven’t chosen one yet, you can also check the Connection Modes by category page to see which tools might be compatible with the least implementation changes.

This page was last modified: 21 May 2020


Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account