Playbook
minute read
Completed [date]

Project: Segment

Learning Objectives

Bonus

We've negotiated a deal with Segment for Demand Curve-affiliated companies that:

  • Are less than 24 months old
  • Have raised less than $5M

If you meet those criteria, you'll get $50,000 in total credits (enough to track 200,000 users for up to two years!)

Learn more by going to demandcurve.com/segment.

Phase 1: Create a Source

  1. Create a Segment account at Segment.com
  2. Go to the Segment dashboard: https://app.segment.com/workspaces
  3. Click Add Source
  4. Select the appropriate Source type
    1. If your product is a website…pick JavaScript
    2. If it’s a mobile app…
      1. (Note for the non-technical: You may have to ask an engineering manager what your mobile app is made with.)
      2. If your mobile app is NOT React Native, you have to create separate sources for the iOS and Android versions of your app.
      3. If your mobile app IS React Native, select JavaScript as normal
  5. Click Connect
  6. Name it appropriately, below are examples of clear names
    1. Site: Website
    2. React Native App:Mobile App
    3. Non-RN App: iOS/Android App
    4. Extension: Extension
  7. The website URL is completely optional and is for Segment’s purposes only, but feel free to enter your website.
  8. Now, add the Segment code to your analytics proposal doc for your engineers to add to your site.
  9. If you have other sites/apps, create separate Sources for them as well.

Phase 2: Add Initial Destinations

We’re going to have you install a couple destinations (places your data goes) to get the hang of how to do it. We’ll be setting up our ad channels as destinations in the next project.

Hotjar

Sign up for Hotjar if you haven’t (we’ll be using it later in the course). Add your Hotjar Site ID and Hotjar will be fully installed.

Intercom

This integration is very useful and makes setting up Intercom extremely easy. All the Segment events become Intercom events that you can then trigger messages and emails from.

Sign up for Intercom.

This integration requires two things:

  1. Syncing with the Intercom account
    1. Assuming you already have Intercom access, all you need to do is log into Intercom through Segment and hit Activate Destination.
  2. Adding the app ID
    1. Grab the app ID from your Intercom dashboard (it’s also the 8-digit bunch of letters and numbers in the URL of the dashboard after /apps/)
      1. Example: https://app.intercom.io/a/apps/we4aokh6

Phase 3: Get engineers to install Segment and add all your events

Your engineers will need to install Segment on your site and add all the events from your analytics proposal doc.

For that, send them Segment’s documentation to follow, along with your analytics events doc to create all the events.

Note: Segment defaults to lumping all your events into the Category of All unless you tell it otherwise. Make sure your engineers tell it otherwise; use your own categories to organize events better.

You’ll want to make sure that they also remove the code that already exists in your codebase for any of the third-party tools that you’ll be installing with Segment. For example, if they’re already adding in Google Analytics manually, they’ll want to remove it from their code.

You should also encourage them to port over any other tools they’re adding in manually.

This may take a while, depending on how fast your company moves. You may have to come back to this project later once they’ve set everything up.

That’s OK. Go do Conversion Events > Project: Configure GA and Ad Channels and come back later.

Phase 4: Verify events are tracking and sending

After your engineers have confirmed installation of Segment, you can use Segment’s Schema and Debugger tools to verify that it’s working.

Schema

Schema lists out all the events that have fired on your site, with a bunch of other info. Click around your site and make sure you see the right events show up.

The Schema section can be used a bunch of different ways:

  • If you’re missing an event from your proposal, you can use it to verify with your engineers that it’s installed properly.
  • If something is firing more or less than you would expect. Is “purchase” firing more than “add to cart”? Something may be wrong.
  • If an event hasn’t fired in a while, the event might be broken somehow.
  • If one event in the funnel has significantly fewer events than the one before it, then this may be an indication that it’s either not firing 100% reliably, or there’s something about your site that’s making a lot of people leave at that spot.

Debugger

The Debugger allows you to watch your events fire in real-time. You can also click on each page event to see other data that was passed along at the same time: things like the category, label, value, URL, and more.

Walk through your site in one window and watch Segment record the events in the Debugger to make sure they’re all firing as expected. You can use this whenever you want to test to make sure it’s still working properly.

Next Step

Move on to Conversion Tracking - Advanced > Configuring Destinations on Segment.

Open search