Skip to content

Instantly share code, notes, and snippets.

@avelis
Created July 2, 2015 20:35
Show Gist options
  • Save avelis/8045728fa83a3bdc9bcf to your computer and use it in GitHub Desktop.
Save avelis/8045728fa83a3bdc9bcf to your computer and use it in GitHub Desktop.
Promoter Segment Integration

Getting Started

Once the Segment library is integrated with your service, toggle Promoter on in your Segment integrations, and add your API Key which you can find in the Promoter menu dropdown under API. Once on that page you will observe the API Key section which contains your actual API key.

The Segment Promoter integration is 100% handled through our servers. Integration with the Segment SDK will be enough for usage with Promoter.

Promoter supports the identify, and track methods. Both will need to be called in order to utlize the full power of Promoter.


Identify

When you identify a contact, we'll pass that contact's information to Promoter with userId as Promoter's Segment Contact ID. Segment's special traits recognized as Promoter standard contact fields (in parentheses) are:

  • email (email)
  • firstName (first_name)
  • lastName (last_name)

All other traits will be sent to Promoter as custom contact attributes.

Track

When you track an event, we will send that event to Promoter as a custom event. That event should have an associated userId sent with it. That userId needs to match the one sent with the identify event. This is the only way we know which contact you would like to associate this event too. With a track event sent for a specific contact we now have intent to survey based on a campaign's settings.

Completed Order

When you track an event with the name Completed Order using the e-commerce tracking API, we will send the event and data to Promoter as custom event with the data stored with Promoter for future use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment