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: '',
  name: 'Jane Kim'

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.

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.


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.


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:


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.


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] and Segment is actively working on adding more. 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: 06 Jul 2023

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.
Create free account