Guide to implementing Segment

Best practices for tracking your product engagement data via for use with Sherlock.

Let's go!

The majority of Sherlock customers deliver their product data via This guide was designed for those who are not currently using Segment to send data to Sherlock - but planning to. It was designed to offer tips and best practices for implementing Segment in order to get the most out of Sherlock.

You can read this guide all the way through by scrolling down - or you can jump to a specific section from the menu above.


The good news about tracking your product engagement with Segment is that their data model and tracking practices have become standard, so there should be no surprises for your engineering team as you build out your plan.

Here are some of the basics you need to know about Segment if you haven’t used it before.

Segment sources

When you use Segment, you can have data pushed to all their Destinations (connected applications) from a variety of Sources.

These Sources can be other tools that generate data you may want to use in your customer analytics (like email tools), but the main source of the data from which you will send toSegment will be your product. You will ship this data from your product by integrating with Segment’s API. These API libraries allow you to send data from your application - either from the front-end via a JS snippet or server-side.

This guide will provide more details on each of the above calls and how they relate to Sherlock. The best reference regarding actually implementing Segment will always be their own

Segment API calls

Segment has a series of specific type of API calls that you will use when setting up your tracking. The ones that are relevant to your Sherlock integration include:

Segment also provides for several other types of calls (Page , etc), but these calls are not relevant to Sherlock. This does not mean that you shouldn’t take advantage of these calls for other Segment integrations, but they won’t provide any value in Sherlock.


Identifying your users helps you answer the question - who is this user? To do this, you will need to use the Segment Identify call. When you “identify” your users, you will assign them a userID (that you will use to track all their behavior) as well as attach any description attributes- called traits - to that user.

These traits are very important for your customer engagement practice. In Sherlock, traits will allow you to create more specific scoring profiles as well as segment your userbase in many different ways enabling better analysis as well as more value for your connections. You can learn more about user segmentation in Sherlock here.

In Sherlock, you can find user traits on a user detail page and... can also segment your user based by any traits you attach to users.

How to Make an Identify Call

You can make an Identify call using any of Segments API libraries. A sample Identify call will look like this:

And the corresponding Javascript event that would produce the above payload:

When to Make Identify Calls

Identifying users is something you will do continuously. It is important to identify your users whenever they become known to you, when they start a new session, or when they change any of their key information. More specifically, you should identify a user:

What Traits to Track

This is very important. As mentioned earlier, user traits will be very important to the value you get from Sherlock. Therefore, you should use traits very liberally. The more ways you can describe your users, the more you will be able to learn about them and their engagement patterns.

Some of the very basic traits you should be tracking are included in the list below. Again, these are just the basics - you should use any other traits that help to describe your users.

(please note that Sherlock uses the last value of any traits you send in any segmentation)


Account-based engagement tracking is one of the most important pieces of functionality in Sherlock. If you are using Sherlock, it is likely this is one of the major reasons why. While it is possible to organize Accounts in Sherlock based on a user trait, by far the best way to track your Accounts is by using Segment’s Group call.

Segment’s Group call was designed to organize data from multiple people around specific groups. In Sherlock, these groups are Accounts. With Segment’s Group call, you can:

In Sherlock, you can find account traits on an account detail page and... can also segment your accounts based by any traits you attach in your group calls.

How to Make an Group Call

The Group call operates, essentially, the same as the Identify call, but instead of assigning traits to a specific user, it allows you to assign traits to a group of users.

You will need to make a Group call at least once for every users in order to assign that user to an Account. After that, you can update information about the Account without making a Group call for each user. A Group call looks like this:

And the corresponding Javascript event that would produce the above payload:

See the Segment documentation for more detail on Group calls:

When to Make Group Calls

Just like with an Identify call, you should make your Group calls:

What Traits to Include in your Group calls

Group (Account) traits are essential for getting the most value possible out of Sherlock. These traits are key for segmenting your Accounts for scoring, analysis, and making your Sherlock data even more actionable as you send it to other tools.

Here are some recommended (and required traits) when making Group traits:

How to configure accounts in Sherlock

If you use Segment's Group call, Sherlock automatically organizes your accounts around the groupId. Also, by default, Sherlock uses the Group trait Name as the Account display name in Sherlock. If you use a different trait for your account names, you can change the display name in the Sherlock Settings tab (more here).


Now that you have created the framework for your tracking by creating your User and Accounts, you will move on to tracking specific activity (ie - events) in your product. For this, you will use Segment’s track call. This is pretty basic event tracking, so should be straight-forward for your team.

What Events You Should Track

Every product is different, so what you track is going to be unique to you. With that said, we have provided a list of some basic SaaS events in the next section.


Don’t overthink your event tracking plan. Too often, teams spend weeks and months planning their tracking work - trying to ensure that every single potential action is covered. This is ultimately counterproductive. To get value out of Sherlock, it’s really only necessary to track somewhere between 10-30 of your most important events - which can be done in a very short amount of time.

Trust us, tracking some events is far better than tracking nothing. Don’t make this a bigger project than it needs to be. Every day you let pass without tracking data from your product is a day you’re going to regret later.

Some Basic SaaS Events

As mentioned earlier, most of the events you track will be unique to your product, but there are some pretty standard SaaS events that you should be tracking. They include:


As a reference, we have included a sample tracking schema for tracking the engagement with your product. We are including just the basic track, identify, and group calls that you should make with specific actions.

As we said earlier in this doc, this schema represents a starting point for tracking your SaaS application. The rest of what you track will be very specific to your product. Tracking your product engagement is a continuous process. Focus on the 10-30 most important events that define engagement in your product and get those into Segment as soon as possible. You can add, expand, and optimize your tracking over time.

Once you have these 10-30 events in Segment, you can push them to Sherlock immediately and unlock the value of engagement scoring for your entire operation.

Schema Tracking Doc in Notion

One of the biggest challenges with tracking your product data is keeping track of all the data that is tracked and making sure that your entire team understands it. We do this in a Notion document and it has been very helpful. We have translated our document into a template that any Notion users can use to track and communicate their own product data. You can find it at this link.

You can read more about how to use this doc on this post.