Sources Overview

What is a source?

A source is a website, server library, mobile SDK, or cloud application which can send data into Segment. It’s where your data originates. Add a source to collect data to understand who your customers are and how they’re using your product. Create a source for each website or app you want to track. While it’s not required that you have a single source for each server, site, or app, you should create a source for each unique source of data.

Each source you create has a write key, which is used to send data to that source. For example, to load analytics.js, the Segment JavaScript library on your page, the snippet on the Quickstart Guide includes:

analytics.identify('user_123', {
  email: 'jane.kim@example.com',
  name: 'Jane Kim'
  });

If you don't see the source you're looking for in our catalog

If a tool is not listed as a supported source in our catalog, then it is not possible to incorporate the integration out-of-the-box within a Segment workspace. However, as an alternative, you can use the HTTP API source to collect data from the tool’s API. You can also use Functions to send or receive data from other tools.

Types of sources

Segment has three types of sources:

Event streams sources

Event streams sources collect data from your website or app to monitor user actions. These sources include website libraries, mobile, and server sources.

Source Overview

When viewing the Source Overview page for an event stream source, you can view a line chart and breakdown table that reflects the volume and details of the events that Segment ingested from your source.

You can use the time picker located on the Source Overview page to specify a time period (last 10 minutes, 1 hour, 24 hours, 7 days, 2 weeks, or a custom date range over the last two weeks) for which you’d like to see data.

A screenshot of the Source Overview page for an Android source.

The breakdown table displays the following details:

  • Event type: The Segment Spec event type (Track call vs. Identify call, for example).
  • Event name: The event name, provided by you or the source. You should only expect to see track calls with event names. If you see unnamed events in the breakdown table, it’s because for other specs, you’re either identifying users/groups or tracking what page/screen the user is on. Both of which do not have event names. The exception to this is if you provide a name in the Page call. Named Page calls also show up in this section with the name of the Page as the event name.
  • Event count: How many of each event was successfully received by your source.
  • % Change: Insight into how the event counts differ from the last comparable time range as a percentage.

Website libraries

Analytics.js, the JavaScript library, is the most powerful way to track customer data from your website. If you’re just starting out, Segment recommends it over server-side libraries as the simplest installation for any website.

Mobile

Segment’s Mobile SDKs are the best way to simplify your iOS, Android, and Xamarin app tracking. Try them over server-side sources as the default installation for any mobile app.

Analytics-Flutter library

The Analytics-Flutter library is currently only available in pilot phase and is governed by Segment’s First Access and Beta Preview Terms. If you’d like to try out this library, access the Analytics-Flutter GitHub repository.

Server

Segment’s server-side sources let you send analytics data directly from your servers. Segment recommends tracking from your servers when device-mode tracking (tracking on the client) doesn’t work. Check out the guide on server-side tracking if you’re not sure whether it makes sense for your use case.

Cloud-mode tracking

Server-side data management is when tag sends data to the Segment servers, which then passes that data to the destination system.

Cloud app sources

Cloud app sources empower you to pull together data from all of your different third-party tools into a Segment warehouse or to your other enabled integrated tools. They send data about your users from your connected web apps. There are two types of Cloud Apps: Object cloud sources and Event cloud sources.

Object Cloud Sources

These Cloud App Sources can export data from its third party tool and import it directly into your Segment warehouse. Make sure you have a Segment warehouse enabled before you enable any of the following sources:

Event Cloud Sources

These Cloud App Sources can not only export data into your Segment warehouse, but they can also federate the exported data into your other enabled Segment integrations:

HTTP

If Segment doesn’t have a library for your environment, you can send your data directly to the HTTP Tracking API. All of Segment’s other sources and platforms use the HTTP API to work their magic behind the scenes.

Pixel

Segment’s Pixel Tracking API lets you track events from environments where you can’t execute code, like tracking email opens.

Event name Description
Email Delivered The message has been successfully delivered to the receiving server.
Email Opened The recipient has opened the HTML message. You need to enable Open Tracking for getting this type of event.
Email Link Clicked The recipient clicked on a link within the message. You need to enable Click Tracking for getting this type of event.
Email Bounced The receiving server could not or would not accept message.
Email Marked as Spam The recipient marked message as spam.
Unsubscribe The recipient clicked on message’s subscription management link.

Reverse ETL sources

Reverse ETL sources are data warehouses that enable you to use Reverse ETL to send data from your warehouse source to your destinations.

Reverse ETL supports these sources:

Segment is actively working on adding more sources. If you’d like to request Segment to add a particular source, please note it on the feedback form.

Create a source

To create a source:

  1. Navigate to Connections and click Add Source.
  2. Click the Source you’d like to add. Note: More than 80% of workspaces start by adding their JavaScript website.
  3. Click Add Source.
  4. Enter a name for your source as well as any information on the setup page.
  5. Click Add Source.

One source or multiple sources?

Segment suggests that you create one source for each type of data you want to collect. For example, you might have one source for all of your website tracking and a different source for any mobile tracking. Creating one source per data type provides the following benefits:

  • Debugger ease of use - mixing libraries/sources on a single API key means you’re heavily reliant on filtering to actually test events
  • Flexibility sending data to different projects - if you want to have different warehouse schemas, analytics projects, etc, having multiple sources would create this separation
  • More control - as your account grows with the number of destinations you enable, having separate sources allows you to have more control
  • A source type cannot be changed once it is created. You must create a new source if you would like to use a different source type.

This page was last modified: 04 Mar 2024


Further reading



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account