Segment io: The Definitive Guide (2020 Update)

Two years ago, I found myself helping a new client implement Mixpanel. We had a good idea of what we wanted to track and it was now just a matter of writing the necessary code.

The client was excited. They were having critical issues converting users from a free account to a paid one and they knew this data would give them the clarity they needed to fix it.

Right before we started writing the Mixpanel code, the client asked me, “have you heard of a tool called Segment io? Should we use it?”.

I told the client that I hadn’t heard of this tool but I would look into it.

After some research, I concluded that there was no need for using Segment in this project. I didn’t see any benefits that would be worth the client paying double: once to Mixpanel and once to Segment.

We went ahead with our implementation and everything worked fine until 6 months later.

The Mixpanel data was incredibly useful but they wanted to start using another event-driven tool called Intercom. The client saw a lot of potential improvements in their messages with their users before and after they signed up. Intercom was the best choice for them.

As we started to plan the Intercom implementation, I realized that we needed to send that same data that we were already sending to Mixpanel. We were going to spend development time doing the same thing we did 6 months earlier.

This seemed so inefficient to me plus we would have to wait a few weeks before we had any meaningful data inside Intercom. I thought that there must be a way to implement data once and use it across multiple tools. That’s when I ended up stumbling back to the Segment.io website.

This is exactly what the tool did! I completely missed it 6 months earlier.

I talked to my client and told them about my mistake. Luckily, they weren’t mad or upset. They knew it was hard to predict the future and we had made an educated guess when we first implemented Mixpanel.

For me though, it was an error in judgment. I didn’t fully understand the value that Segment brought to the table.

Fast forward to today, and I now recommend Segment to almost every new client. The long-term benefits of owning your data far outweigh the short-term costs. I have also spent significant time understanding the problems that Segment solves.

This is why I decided to create this guide back in 2019. It’s 2020 now and Segment.com continues to be one of my favorites tools and companies. They have built an amazing product that just works. 

This guide will answer all of your pressing questions around Segment.io. We’ll start at a high level by understanding the strategy behind using Segment and then we’ll move to the tactical by looking at how to collect data today.

If you’re looking for just the 2020 update, skip right over to the “Segment.com in 2020” link below. You’ll find a 10-minute video with some of the latest changes, where I think Segment is going and how it fits into your overall strategy.

Related: If you’re ready to start implementing Segment.com, make sure to download our Segment.com Quickstart Checklist which will give you an easy to follow a checklist to save you time and resources.

Let’s dive right in.

  1. Introduction
    1. What is Segment.com and how does it fit into our strategy?
    2. What is the difference between Segment.com and Google Tag Manager?
    3. Should I use Segment.com with Mixpanel/Intercom/Google Analytics/etc?
  2. Getting Started with Segment.io
    1. Setting up an account
    2. Sources: SDK, Libraries and Cloud Apps
    3. Destinations: Integrations
    4. Destinations: Warehouses
    5. Understanding the MTU pricing model
    6. Protocols: Data Governance for Your Data
    7. Personas: Easily Manage Audiences for Your Product
  3. Real-Life Examples on How to Use Segment.io
    1. Example 1: Sending event data to Mixpanel
    2. Example 2: Sending event data to Intercom
    3. Example 3: Sending data to Google Analytics
    4. Example 4: Loading pixels for Facebook and Adroll
    5. Example 5: Segment.com and Google Tag Manager together
    6. Example 6: Sending Adwords data to Amazon Redshift
    7. Advanced Usage of Segment.com
  4. Annual Updates
    1. Segment.com in 2020

Introduction

What is Segment.com (or Segment io) and how does it fit into our strategy?

Segment.com functions as a middle layer between where your data comes from and where it should go. In this video, we will talk about:

  • How does Segment.com work and why you should use it?
  • Understanding the strategic choice you’re making when you decide to use Segment.com
  • A brief overview of the different tools that Segment supports including Mixpanel, Google Analytics and Amazon Redshift.

What is the difference between Segment io and Google Tag Manager?

If you see some overlap in functionality between Google Tag Manager (GTM) and Segment, you’re not wrong. However, there are different use cases for each tool and you can even use them together.

Should I use Segment.com with Mixpanel/Intercom/Google Analytics/etc?

If your team is debating whether to implement your analytics tool through Segment.com, then this video is for you. I’ll give you 3 use cases where you should use Segment and 3 use cases where you shouldn’t.

Getting Started with Segment.com

Setting up an account

Let’s cover basic Segment concepts including workspaces, sources, and destinations.

Sources: SDK, Libraries and Cloud Apps

SDK and Libraries is one of the most flexible ways to collect data. Let’s use the Javascript library to understand events, properties, traits and core methods like track(), identify() and page().

Cloud apps is a type of source lets you pull data from popular services like Stripe, Google Adwords and Facebook Ads. Learn why you would ever want to do this and how it works.

Related: If you’re ready to start implementing Segment.com, make sure to download our Segment.com Quickstart Checklist which will give you an easy to follow checklist to save you time and resources.

Destination: Integrations

After you collect data, you need to send it somewhere. Integrations will let us send our data to all kinds of tools including Mixpanel, Google Analytics, Intercom and 200+ others.

Related: If you’re in charge of marketing or product at your company, be sure to check out the 6 Reports That You Should Be Running to increase the growth of your product and company.

Destination: Warehouses

Warehouses is a special type of destination designed for more advanced teams. Learn why you should consider setting up a warehouse even if you’re just starting to collect data and the different options including Amazon Redshift, Postgres and BigQuery.

Understanding the MTU pricing model

A short video explaining the Monthly Tracked Users (MTU) pricing model for Segment.com.

Protocols: Data Governance for Your Data

In this video, I’ll explain how the Protocols work and how it can help you protect the integrity of your data.

Personas: Easily Manage Audiences for Your Product

We’ll take a look at how Personas work and how it can help you save you time when creating audiences for your marketing campaigns.

Real-Life Examples on How to Use Segment.com

Example 1: Sending event data to Mixpanel

Let’s take a look at how to collect data using a Javascript library and send it to Mixpanel. We’ll send events and identify users, all within a few minutes.

Example 2: Sending event data to Intercom

In this example video, we’ll look at how to use Segment.com with Intercom. We’ll load the chat widget on a website and start tracking individual users so we are able to message them directly.

Example 3: Sending data to Google Analytics

Learn how to use Google Analytics alongside Segment.com. We’ll look at the basic setup for tracking page views and more advanced use cases including ecommerce tracking, userID and custom dimensions/metrics.

Related: If you’re in charge of marketing or product at your company, be sure to check out the 6 Reports That You Should Be Running to increase the growth of your product and company.

Example 4: Loading pixels for Facebook and Adroll

Segment can also be used to load marketing pixels for advertising platforms like Facebook Ads, Google Adwords and Adroll.

Related: If you’re ready to start implementing Segment.com, make sure to download our Segment.com Quickstart Checklist which will give you an easy to follow checklist to save you time and resources.

Example 5: Segment.com and Google Tag Manager together

While Google Tag Manager and Segment have similar functionality, you can actually use them together. We’ll take a look at two setups: loading Segment through GTM and loading GTM through Segment.

Example 6: Sending Adwords data to Amazon Redshift

Our next example is about collecting data from our Google Adwords campaigns and sending it to an Amazon Redshift database. This is an advanced setup that should only be tackled once you understand the basics.

Advanced Usage of Segment.io

Our final example is showing how a Segment account looks when you have multiple sources and destinations. You’ll quickly start to see the power of easily transferring data between your most popular tools.

Annual Updates

Segment.com in 2020

The last year has been huge for Segment. They continue to add integrations (300+ now), expanded their privacy controls making it easier to comply with GDPR and added the ability to capture data from any source using Functions. The product continues to get even more useful as a single source of truth.

Next Steps

That’s all for now! If you found these videos useful, email me a comment below and tell me the biggest insight (or aha moment) that you had after watching the videos.

One more thing before you go! Do you know how to get more insights out of your data? 

All companies are sitting on a goldmine of data that they haven't fully explored. It's not about technology or capturing more data. The key is to learn how to make the most of your current data and convert it into actionable insights. This is the main idea behind my first book, The Data Miage: Why Companies Fail to Actually Use Their Data

I'm excited to announce the release of the book through all major retailers. If you're interested, you can download the first chapter for free using the form below. You'll learn what the best data-driven companies do differently and how to make sure you're playing the right data game.

13 thoughts on “Segment io: The Definitive Guide (2020 Update)”

  1. Thanks Ruben, finally I’ve got why we need Segment and how to use!! Very useful videos.
    1 thing that I still didn’t get – how do I trigger originally an event to send to Segment (if I don’t use GTM for it).
    You showed how to do it via js console, but how does it work in real life, when button is clocked on website etc..

    • Glad you found it helpful! If you don’t use GTM, then you would need to use one of their libraries like their Javascript one (https://segment.com/docs/sources/website/analytics.js/). The code you entered into the JS console would be the same one that you would have to load on your website. If we look at your button click example, you would also need a way to trigger that which could be done with something like jQuery. The full code sample would look like this:


      $( "#buttonID" ).click(function() {

      analytics.track('Article Completed', {
      title: 'How to Create a Tracking Plan',
      course: 'Intro to Analytics',
      });

      });

  2. Hi Ruben,
    Great guide! Just what I was looking for.
    Quick question: how would you track new website users using Segment?

    Currently, I am using snowplow analytics and I can use the domain_sessionidx, which is a visit count, stored in a first-party cookie (the same cookie which keeps track of domain_userid)

    Thanks!

    • You could do something similar by storing a trait that counts total visits though this is something that analytics tools figure out after processing the data e.g. Google Analytics New Users. If you’re doing with just the raw data, you can do the trait (which can be a bit a tricky to maintain) or you would look at how many new users were recently identified or fire their first event.

  3. Hi Ruben,

    Thank you for the guide and the video!
    In regards to your video about Segment + Google Analytics:

    Do you actually need to set up the code for tracking events or enhanced ecommerce by yourself or does Segment do that automatically for us?

    So do you actually need to be a developer to be able to use segment properly and set everything up?

    Best regards,
    Tom

  4. Really great article/guide. Found it very approachable and timely (looking at expanding our usage of Segment). Appreciate the hard work!

Comments are closed.