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 Segment’s 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
The Source Overview page for an event stream source shows you a pipeline view of all events Segment receives from your source, events that failed on ingest, events that are filtered at the source level, and “eligible events”, which are the events that will flow into your destinations. If you select one of the steps in the pipeline view, you can see a line chart that reflects the fluctuations in volume alongside a breakdown table that has more details about the events impacted by the selected step.
Pipeline view
The pipeline view shows each of the four steps Segment encounters when processing data from your source:
- Events successfully received: All events that Segment received from your source.
- Failed on ingest: Events that failed at the Tracking API level. For more information about errors that might cause events to fail on ingest, see Delivery Overview’s Troubleshooting documentation.
- Filtered at source: Events that were filtered out by source schema controls, Tracking Plans, or a common JSON schema.
- Eligible events: Eligible events are the events that flow downstream to your Segment destinations. This value is read-only, but you can see the events that flow downstream to a particular destination using Delivery Overview.
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. Segment sets the time picker to show data for the last 24 hours by default.
Breakdown table
The breakdown table displays three tabs, Event type, Event name, and App version.
- Event type: The Segment Spec event type (Track call vs. Identify call, for example). This tab also contains a “% change” metric, which displays how the event counts differ from the last comparable time range, represented as a percentage.
- Event name: The event name, provided by you or the source.
- App version: The app/release version, provided by you or the source.
Each of these tabs displays an event count, which is the total number of events that Segment received in a particular step.
The Unnamed or batched events under the Event Name tab is a collection of all identify and page/screen calls in the source.
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:
- Navigate to Connections and click Add Source.
- Click the Source you’d like to add. Note: More than 80% of workspaces start by adding their JavaScript website.
- Click Add Source.
- Enter a name for your source as well as any information on the setup page.
- 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 after it is created. You must create a new source if you would like to use a different source type.
This page was last modified: 29 May 2024
Further reading
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!