At Tagticians, I have been providing Segment consultancy services for several years now. Segment is a great tool that combines the powers of CDP with data collection and endpoint distribution. If you use Segment, make sure you start using these top 5 features.

Feature #1: Computed Traits

Segment is a Customer Data Platform (CDP) and can easily store data collected through its identify function to profiles. These traits (parameters) can later be used for segmentation and personalization purposes. In addition to the identify function, you can also use computed traits to add new traits to a user’s profile. You can find the computed traits feature in Segment’s Personas module. Computed traits allow you to create new traits based on a user’s tracked interactions, so-called events. Identify the event you wish to extract a value from, and then select the property you want to turn into a trait, often in real-time.

Computed Trait options

Segment offers out-of-the-box computed trait configurations. These configurations will help you get set up relatively quickly. Although most computed traits options do not require any code to configure, its SQL option is the most powerful and does require more input to create.

  • SQL: Create any trait from your data warehouse
  • Event Counter: Stores a count of a particular event over a period of time
  • Aggregation: Defines a computation that aggregates properties into a single value
  • Most Frequent: Selects the most frequent property value of a particular event
  • First: Property value of the (specific) first event seen
  • Last: Property value of the (specific) last event seen
  • Unique List: Unique list of values from event properties
  • Unique List Count: Count of values in a unique list

Some examples of traits that you can create using Segment’s computed traits options are:

  • Last 5 viewed products (Array, SQL)
  • Most viewed product brand (String, Aggregation)
  • Number of orders placed (Integer, Event Counter)
  • Last sign-in (Date, Last)
  • Coupons used (Array, Unique List)

A bonus is that a computed trait can be offset against time through a Time Window. So, for instance, if you want to have the value of a trait determined based on the user’s the last 30 days of activities, you can do that.

Segment computed traits set up interface

Feature #2: Personas Profile API

Collecting and building traits in Segment’s Personas module is one thing, but how do you create value? This is where Segment’s Personas Profile API comes in. Although the Personas Profile API is pretty straightforward, this Segment feature’s strength lies in how you purpose the data.

segment personas

Here are three examples how of how to leverage the Personas API:

Enhance a payload before forwarding it to a third-party endpoint

This is especially useful when sending data to endpoints like Google Analytics or other data aggregation tools. For instance, by using the Personas Profile API in combination with Google’s Measurement Protocol, you can add a Custom Dimension indicating if a user is an existing customer or not.

Utilize traits for frontend personalization purposes

This is an absolute favorite of mine. By building computed traits using SQL or out-of-the-box options, we can label customers based on previous shopping behavior. Consider creating a trait that indicates a Customer Lifetime Value (CLV), or Average Order Value (AOV), that will allow you to identify high-value customers. When you can determine when a high-value customer is on your website or app, you could potentially proactively approach them and offer complimentary personal shopping services. The possibilities are truly endless.

Make traits available on third-party platforms

An undervalued method of leveraging Personas Profile API is making (some of) the data available to third-party apps. The easiest way to picture this is to think of a customer service portal. You can make specific traits available to a customer service agent through the Personas Profile API by connecting the two SaaS platforms. This way, you could, for example, have the customer service agent look at the customer’s latest order, recent Trustpilot review score or, just like with personalization, let the customer support agent know if they are communicating with a high-value customer.

Feature #3: Source Functions

It is difficult to explain why I love Segment Source Functions in just one or two paragraphs. Segment’s core functionalities are collecting data through its SDK or Webhooks. Add to that this wonderful feature, Source Functions. Source Functions, just like my next favorite feature Destination Functions are comparable to cloud functions and run in a Node environment.

source function flow

What makes Source Functions so unique? It allows you to capture and work with data sent to Segment before it gets processed internally. What are some common cases where you can use this? In my experience Source Functions can be used to receive data from other tools. Many SaaS platforms will allow you to send data to another platform using Webhooks. Segment allows you to create a Webhook for almost any purpose.

source function transformation flow

In most Webhook cases you will need to transform the data model to one that Segment can process. Source Functions does this wonderfully for all event types Track, Identify et al.

Feature #4: Destination Functions

Destination Functions are similar to Source Functions but with the difference being that now you can process any data before it gets sent to endpoints outside of Segment. If you need a comparison, I often find it easy to explain this as the Google Tag Manager Server-Side module of Segment. The endpoint will need to be able to receive POST or GET methods or work with Webhooks themselves.

destination function flow

As I have experienced many times myself, Segment’s out-of-the-box Google Analytics Destination option is very limited in terms of configuring Custom Dimensions. The out-of-the-box solution does not allow you to set User or Product scoped Custom Dimensions. In those cases, I revert to using the Measurement Protocol. Destination Functions is the perfect solution for this approach.

Another example is when combining affiliate campaigns in combination with server-side tracking when a user places an order. In those situations, we need to store any affiliate-related campaign variables, set during the start of a visit, as a trait in a user’s profile. With the Destination Function for Order Completed events, we can:

  1. grab the userId value from the Order Completed payload
  2. perform a Personas Profile API call using the userId to see if an affiliate related campaign trait exists in the user’s profile
  3. check to see if it is still valid using the verbose parameter to expose the trait’s metadata
  4. based on conditional settings attribute the Order Completed event to the affiliate

Feature #5: Transformations

This Segment feature is a bit harder to find. Well hidden under the Protocols menu, Transformations allows you to do a few cool things. The sole purpose of Transformations at the time of writing is to enable you to alter event names, property names, or trait names. This can come in handy when passing data to multiple endpoints that could potentially have different naming convention requirements or when you are waiting on a fix to go live. With transformations you can effectively:

rename an event

Segment transformation event name

rename an event property

Segment transformation event property

rename an event trait

Segment transformation event trait

I have experienced a real-world example where an event name had the incorrect casing. Instead of using Segment’s default naming for when a product is added to a cart, ‘Product Added’, the event name was written ‘ProductAdded’. With Segment being case sensitive, this caused many problems with out-of-the-box destinations. Through a quick fix using Transformation, we were able to rename the event.

Segment transformation configuration

An added bonus for the Transformations feature is that you can apply the rule at a Source level, so before Segment processes the data for ALL endpoints, you can apply the rule for an individual endpoint.

What are your favorite Segment features?

Now that I have shared my favorite Segment features with you, what are yours? Feel free to contact me via the website, schedule an online meeting, or reach out to me via LinkedIn. I am happy to talk about Tag Management or my Segment consultancy services.