As a Segment Certified Partner, I can seem a little biased. Having worked with Segment on many projects I can honestly say that it is the perfect solution for those looking to consolidate a large chunk of their marketing stack into a single SaaS.

What is Segment?

Segment can be described as a solution that can manage your data collection and distribution. It will allow you to control what you collect, store, and share with third-party platforms on a granular level. It can continuously monitor the data quality, and at the same time build and maintain profiles of your visitors in a centralized location.

Let’s start with what Segment cannot replace. Segment will not replace your everyday quantitative or qualitative analytics tools like Google Analytics, Mixpanel, Hotjar, or even Google Tag Manager in some edge cases (more on this later). It will not replace any marketing communicative platforms you might be using eg. Iterable, SendGrid,, etc. It will however allow you to replace certain functionalities within many premium tools like server-side tracking, utilization of conversion APIs, or the enrichment of data through cloud functions. And the cherry on top, it can all be done in a centralized location.

Segment cannot be labeled as only a tag management system or only a customer data platform. What the people at Segment have done is develop a fully integrated system that will offer you more control and generate more benefits with less effort.

Full suite of data collection features

The origins of Segment can be described as a data collection gateway. A simple library-fed collection of destinations where you could send data from any source. The power of this approach is the simplified way in which data is collected. Based on a reasonably straightforward naming convention, Segment can take incoming data and transform it into any format and pass it on.

You can imagine it being a Zapier-on-steroids. Through a set of fixed event types, Segment will allow you to do valuable things with your data.

  • Want to track a page or screen view? Use the or analytics.screen() function calls.
  • Want to track an event? Use the analytics.track() function call with your own defined set of relevant parameters.
  • Need to store information on a user’s profile? Use the analytics.identify() function call with traits with which you want to identify the user with.

A big benefit of Segment data collection is the ability to mix and match. Let’s say you need 100% accuracy for critical events such as transactions, cart updates, and registrations. Your motivation is that you have Segment connected to a marketing communication platform that sends out onboarding, abandoned cart, and order confirmation emails.

segment source split

The common approach for Segment is to collect generic events client-side (eg. analytics.js SDK), but collect the critical events server-side (eg. Node.js SDK). Within Segment, based on a userId (if the user has registered) or an anonymousId you can bind the data to a single profile.

Send data to any endpoint

Now that you have optimized the collection of data from any viable source, what can Segment help you achieve? Segment will allow you to set up Destinations, other third-party, or proprietary platforms, which you want to send the data to.

Let’s use the following example:

A user visits your website and purchases a product. The user does not have an ad blocker installed and has consented to be fully tracked. Segment, through the implementation of tracking using the analytics.js SDK and Node.js SDK, will track the Order Completed event on the client-side and server-side.

segment sources to destinations client side and server side

What happens on the client-side?

In our example, the client-side tracking will be used to facilitate the sending of data to Google Ads, Facebook Ads, and Snapchat. Segment will inject the scripts for any enabled device-mode destination into the browser of the user and populate it with the data sent. Segment has neither an out-of-the-box destination solution for Snapchat, nor does Snapchat support server-side tracking. For this reason, we enable Google Tag Manager from within Segment (which gets injected the same way as any other client-side destination) and configure the Snapchat tag, triggers, and variables in the container. We will block the Order Completed event tracking to Google analytics since we will track it using Google Analytics Measurement Protocol for increased accuracy.

What happens on the server-side?

This is where it gets more fun. By enabling cloud-mode (a.k.a. server-side destinations) we can easily send data to Google Enhanced Conversions, Facebook Conversion API, and Google Analytics Measurement Protocol. Since, in this example, we have set up our order confirmation emails through we will also send the Order Completed event payload there.

* Segment will send the full transaction payload to so that it can send the order confirmation email

** Segment will take care of preparing the data, hashing PII variables prior to sending automatically.

Built-in cloud functions feature with CDP integration

As I mentioned in my Top 5 Segment Features post, the built-in cloud function feature is worth every cent. Based on Node.js technology, it will give you the flexibility you need to extend or improve your data collection or distribution capabilities. The cloud function features come in two flavors:

  1. Source Functions
  2. Destination Functions

segment source and destination functions

What is a Source Function?

A Source Function will allow you to pre-process any incoming data from any enabled source before it gets ingested by Segment. One of my favorite examples is the following:

If you have a third-party tool that allows you to send data you can capture this in Segment and process it. A good example is customer service tools. When a user opens a support ticket, the tool can send that event to the webhook. This means that Segment can receive the Support Ticket Opened event with the customer’s information (so that it can be linked to a profile) and support topic and store that data in de Personas (CDP) module. Data like this can later be used to build audiences, custom traits, or even automate follow-up surveys to score the service given.

What is a Destination Function?

A Destination Function will allow you to process any data received by Segment before you send it to an endpoint. You usually use Destination Functions to enrich outgoing data, or build API connections with services that are not supported out-of-the-box by Segment. From practical experience, I have used Destination Functions to add user profile data to Google Analytics custom dimensions. Before you send out any data you can make calls to the Personas (CDP) module and add generalized values to a custom dimension, such as:

  • Has the user made any previous purchases?
  • Based on the user’s customer lifetime value, in which (pre-defined) customer type category does the user fall?

Destination Functions, since it is based on Node.js, will allow you to add custom libraries to extend the functionality. Use libraries from Google Cloud, Stripe, Sendgrid, and more to tailor the function to your needs. See the full list of Segment Destination Functions runtimes and dependencies here.

Monitor data quality on the fly

Having set up one or more sources from which to collect data, there is one thing we should never lose sight of and that is data quality. The single most common problem with data collection today is the ever-shifting environments our tracking solutions reside in. From redesigns to e-commerce platform migrations, there are so many things that can fail in terms of collecting data.

In the past I have created open source solutions for Google Tag Manager’s dataLayer, to monitor any potential data quality issues using Firebase. It worked well and helped me save face plenty of times. However, it was a hack. Nothing was helping me understand the underlying issues. Segment solves that by using a module called Protocols. The Segment Protocols module will allow you to create a tracking plan. A track plan will contain details on every single event that will be tracked, including the parameters. Based on a set of rules you define in your track plan, you can instruct it to trigger a violation of the track plan when there is a problem. Those triggers can include:

  • missing parameters
  • parameter value type mismatch
  • parameter value RegEx mismatch
segment violations

Segment Tracking Plan – Violations example (sensitive data blurred).

segment violations product viewed

Segment Tracking Plan – Product Viewed violation example (sensitive data blurred).

Following a violation, Segment will either process the data, or Segment will block the erroneous payloads until you have reviewed and corrected them. In any case, Segment will provide you with detailed information to allow you to understand the root cause of the problem. This will allow for a faster response time in fixing data quality issues.

Manage PII data at any stage

In addition to managing data quality, Segment will also monitor the presence of personal identifiable information (PII) in every piece of data sent to it. Segment will pro-actively scan and try to check against any recognizable PII data embedded in your data payloads.

segment privacy example

Segment will scan for PII data and allow you to classify the data. Classification can be done by assigning three color codes, red, yellow, and green. Red is restricted data, and definitely PII data. The power of Segment is that for those red classified data points you can control where it can be sent to. Some examples:

  • A phone number should be sent to a customer service platform, but (unhashed) to Facebook.
  • The shipping address should be sent to your marketing communication platform for disclosure in the order confirmation email, but not anywhere else.

These rules can be set at your own discretion and according to your own guidelines. You can even block a value from being ingested in Segment, to begin with.

segment privacy standard controls

Segment Privacy – Standard Controls (sensitive data blurred).

So, it is not so much a case that the options are limitless, it is the fact that you have the option to control that makes this such a powerful feature.

Automated consent management for any endpoint

We are almost there. The list of why you should use Segment is long, but this is a feature that I need to mention. Segment’s drop-in consent manager for analytics.js is a time-saver, pure and simple.

Like many European Union and California-based companies, GDPR and CCPA are a thing. Without getting into the details or politics of these legal requirements I will look at the practical impact. When using tools like Google Tag Manager, you will need to connect your cookie consent solution to every individual tag in the published container. Although supplies like CookieBot and OneTrust offer great solutions, Segment does it better and easier.

segment integrations full example

Example of Consent Managers injection of endpoint permissions based on a user’s consent level.

Segment’s Consent Manager will scan all client-side enabled destinations eg. Google Analytics, Amplitude, Facebook Pixel, Google Ads, LinkedIn Insights tags and link these to the consent level defined by a user. Without any further configuration, when the Consent Manager is implemented it will check the consent level set by the user and pro-actively tell Segment not to pass on the data to eg. (re)marketing/testing and/or analytics destinations. It realizes this by adding settings to the integrations object in the payload sent to Segment.

I will be transparent and mention two shortcomings of the Consent Manager:

  1. It is built on the React framework. So if you use WordPress (PHP), Vue, or any other non-React framework, this solution will not work.
  2. The solution only works with the analytics.js SDK and is incompatible with iOS, Android or any other commonly used SDKs.

Segment is a CDP, too

We are nearing the end of my enthusiastic rant. We can simply not forget that Segment is a customer data platform, too. Using the analytics.identify() function call, we can send profile-related information to Segment’s Personas module. Profiles are created on every visit and are linked by default to an anonymousId generated by the SDK. From that moment on, you are free to start adding traits to a profile. Nothing new, I agree.

Extending Personas profiles is not a fun part. Implementing analytics.identify() function calls to events like registrations, and profile page updates are standard practice. The fun starts when you can get creative. By using features like Computed Traits we can use a user’s historical behavior to add new traits to a profile.

segment computed traits

Segment will use historical events tracked, and linked to an individual user, to build the values. These can be strings, arrays, booleans, numbers etc.

Some examples of Computed Traits include:

  • Most Viewed Brand ID
  • Favorited Product IDs
  • Customer Lifetime Value
  • Number of Opened Support Tickets
  • Last Campaign Email Opened
  • Push Notification Enabled

Great, now what? I am glad you asked. In Personas there is an option to manage audiences. Not only manage audiences but connect them to destinations directly from Segment. Segment will sync any audience you define to destinations such as Facebook, Google, Snapchat, and more. The lists will be synced for use on the advertising or newsletter platform of your choice. Segment will update these lists in (near) real-time based on fresh data collected from your enabled sources.

Worried about Privacy, GDPR, CCPA, or just don’t want to sit on profile data when the user doesn’t want you to? Segment’s Deletion Request features will allow you to force delete data from your Personas (CDP) database. In other words, Segment will allow you to adhere to your user’s wishes in data distribution and retention. Truly the cherry on the cake.

So, is Segment really worth it?

Segment truly is a versatile and powerful solution for any company. Regardless if you are a start-up or an international enterprise, Segment’s capabilities will be of value to anyone seeking to gain more control of their digital data. No, it is not a plug-and-play solution, but anything of value requires time and resources to leverage. The same goes for Segment. Through proper implementation and management Segment will help your company gain the upper hand.

Of course, there are other solutions that offer a part of what Segment can do. Google Tag Manager server-side is taking the marketing tech world by storm and is a great solution, but even here, it is only part of a solution that still requires lots of time and resources to be of value. If your company is working with analytics, marketing, and customer data platforms, is concerned about privacy laws, and wants to monitor and act on data quality issues, then Segment is a solid solution for you.