Building a Plugin

Developer Center no longer accepts new components.

Segment is redeveloping the Developer Center and will launch a new version when complete. To stay up to date, add your contact information here.

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 “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 (for example, A/B testing, Push Notification, In-App Messaging and LiveChat).

Getting Started

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

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

Build & Test

Once you’ve created an App, you’re ready to starting building your Plugin. 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, make sure to reference the above wikis to test your plugin locally. Before reviewing, Segment needs to see a full suite of cross-device tests.

Next Steps

Complete the remaining steps as outlined in the Developer Center Overview

This page was last modified: 10 Jun 2022



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