The Segment Product Model
Segment Customers use Sources to collect all data across all their properties (web, mobile, CRMs, email etc.).
They use Segment to intelligently route this data with a flip of a switch to Destinations where they perform analytics, run marketing campaigns, and much more.
The Spec is arguably the most critical component of Segment. It’s how we preserve semantics between disparate writers and readers of data, and ensure that sources and destinations can stay on the same page. It’s crucial that your Source or Destination adhere to the spec. If you encourage customers to break the spec, you are breaking the promise of Segment, which is grounds for removal from the catalog.
If there is something unique about your tool that requires specific data points that are not included in the spec, please get in touch. We love partner suggestions for augmentations to the spec!
“Sources and Destinations” are a bit more complicated under the hood than publishing and subscribing to data to and from Segment’s servers. For instance:
- We offer SDKs that expose runtime support for plugins so that Destinations may be configured in either Cloud Mode or Device Mode.
- Within Destinations, we have Streaming Destinations, Batch Destinations, and Warehouse Destinations, all of which receive different data, via different processes, at different intervals and with varying degrees of control and flexibility.
- On the Sources side, integrations are categorized based on whether they send Objects or Events, whether they are “Push” or “Pull,” and whether they are built and hosted by Segment or by Partners.
Segment is committed to providing more and more APIs and Components through the Developer Center at these various hook points that allow customers and partners to read and write data from Segment, and to configure and control the flow of that data.
Today, Partners can use these APIs to write Subscription Components, and use the Developer Center to add them as Destinations in Segment’s Connections Catalog.
Subscriptions are the basis for Cloud Mode Destinations, and are the starting point for our partnership. Subscriptions can be created, configured, and managed in the Segment Developer Center.
Subscriptions give you complete control over how you want to store, transform and process your customers’ data. It means that our customers can immediately start sending you data from any one of our sources—from the browser, from their mobile apps, or from their servers—with no added work. Segment Business Plan customers can also replay historical data from our archives, which means you can demonstrate the full value of your tool immediately upon enablement.
Note that Object data collected from Cloud Object Sources (such as Stripe, Zendesk, and Salesforce) currently only targets customer Warehouse Destinations and is not not made available to Destinations through Subscriptions.
Subscription-based Destinations work well for analytics tools, email marketing tools, attribution tools, CRMs, raw data tools, helpdesks, customer success tools, etc.
Building a Subscription
You can build a subscription to customer data in two ways: Code or Webhooks.
Webhooks are designed to be the most traditional way to receive data. You can refer to a reference HTTP server implementation and implement the same concepts in any language, deploy it to your infrastructure, and paste the resulting HTTPS URL into the Segment Dev Center. Segment will POST data to your Webhook service.
Streams are the basis for sending events to Segment directly as an Event Source. If you supply channels and properties where customer interactions happen, you can apply for inclusion in the Segment Source Catalog with a documented Stream. Streams are not yet supported in the Developer Center but we are working with select partners currently, and are working to make this available to any partner via the Developer Center in the future, so feel free to get in touch and get started if you’re interested in eventually joining the catalog!
Client SDK Plugins (Coming Soon!)
Client SDK Plugins are the basis for Device Mode Destinations and, in the future, possibly Device Mode Sources. Support is not yet available in the Developer Center, but we are working with select partners so get in touch and get started if you’re interested in eventually joining the catalog!
Client SDK Plugins are used to augment Subscriptions and Streams by shipping code to the End User’s Device. Segment’s SDKs ([analytics.js], analytics-ios, and analytics-android) serve as microcosms of the Segment runtime — they enable the dynamic orchestration of event collection, cleaning/transformation, and delivery.
Client SDK Plugins are an appropriate component if your source or destination requires client-side side effects, such as collecting ambient data in the client (Heatmapping, Error & Performance Monitoring tools), relying on device-native context such as third party cookies (Advertising pixels), or needs to actively modify the Client UI (e.g. A/B testing, Push Notification, In-App Messaging and LiveChat).
Syncs (Currently unsupported for partners)
Syncs are scheduled processes that pull data from Partner APIs and upload it to Segment’s Object API, or which pull data from our Object and Event Archives to load into Data Warehouses. Currently, the Object API only targets customer Warehouse Destinations. This data is not made available in streaming destinations.
Today, we don’t have a mechanism for running partner-contributed object sources. If you’d be interested in building one, do get in touch as it’s in our backlog.