Building a Plugin

The Developer Center currently only supports the Subscription component in Developer Preview. Please include your information here and we will reach out once Plugins are made available!

SDK Plugins are used to augment traditional Destination and Source components (Subscriptions and Streams) by shipping code to the End User’s Device. You can use this mechanism to enable customers to dynamically include your libraries or SDKs and to wire up the Segment SDK to invoke them directly when your plugin is enabled. This pattern is most commonly used to build what we call “Device-mode Destinations”.

Segment’s Client SDKs (analytics.js, analytics-ios, and analytics-android) serve as “microcosms” of the Segment Customer Data Infrastructure runtime — they enable the dynamic orchestration of event collection, cleaning and validation, transforming, and delivery to collection endpoints right from inside the SDK.

SDK Plugins are an appropriate component for your App 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).

Getting Started

Please review the steps outlined in the Developer Center Overview. This document outlines specific details for Step 4 as it relates to building a plugin.

  1. Understand Segment’s Conceptual Model and Spec.
  2. Request access to the Segment Developer Center.
  3. Create an App.
  4. Build and test your Component(s).
  5. Publish documentation.
  6. Submit your App for review.
  7. Launch into Public Beta!

Build & Test

Once you’ve created an App, you’re ready to starting building your Plugin. Please refer to the documentation and examples in these repositories to learn how to build and initialize your plugins for the appropriate libraries.

As with all partner contributions, only those which follow the Segment Spec will be approved. Once you’ve finished building your plugin, please make sure to reference the above wikis to test your plugin locally. Before reviewing, we’ll need to see a full suite of cross-device tests.

Next Steps

Complete the remaining steps as outlined in the Developer Center Overview


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