COURSE 2 • Lesson 7

Tracking plans for B2B companies

Learn how to setup your tracking if you are a business that sells to other businesses.

Companies that sell a product or service to other businesses have a different need than most companies when it comes to analytics and marketing. They need to understand their customers' behavior both at the user-level, and also at the aggregate company or team-level. We face this challenge internally at Segment. We need to understand where users are getting stuck in the funnel, but also where the workspace, with one or more users, are at. In this article we will take a closer look at setting up your tracking to model these more complicated business relationships.

Identify & Group Call

When a user signs up, or is invited to an existing account, there are usually two identities you want to track and link: user and account. You would leverage the identify and group calls in the Connections API to collect this information. For example, when signing up for Segment, in the first step I am collecting information about the user like email and name, so I'd implement an identify call when the user hits 'Continue', and after a userId has been created in the database.




Conceptually, implementing the identify call means that Segment will create a user in an end-marketing or analytics tool, along with any traits you've specified.

On the next page, you'll notice that we're collecting data about your business so that we can better personalize the experience you get with our product. To capture this data, you'd want to implement a group call after the user clicks 'Create Free Account'. The group call requires a user identifier, an account-level identifier, which in Segment's case we call a workspace id, and any traits about that account.




What you've done by implementing the group call is created an account record in your Destinations, and specified the relationship between a user and that account. This could be an account in Salesforce, a group in Zendesk, a company in Intercom.

There's one more common situation where you might want to implement the group call. With B2B businesses it's common for one user to sign-up, and then to invite colleagues to that account.




When the invited user signs up, or logs in, you'd want to send a group a call to link the user to that account as well.

What events should I track?

Along with the identify & group calls to create user and account entities in your Destinations, you will also want to track the various events that a user is performing. For this purpose we have created a recommended B2B Saas Spec with common events in your user funnel.

In the examples provided earlier of user signup, account creation, and user invitation, I would also have implemented the following track events:

Note that for inviting users, there is one event fired when a user is invited, and then another one when the invited user actually creates/logs in to their account. Astute readers will also notice the context.groupId  field. Where possible, we recommend that you add this field to your tracking events so that we know which user and which account this event is associated with. This is important in the situation where a single user can be tied to many accounts, and you want to make sure that any analysis or customer engagement is using the events tied to the proper user & account pair.

icon-collecting-the-right-dataCollecting the right data

Next lesson


Get every lesson delivered to your inbox

Enter your email below and we’ll send lessons directly to you so you can learn at your own pace.