This integration consumes Segment events and uses them to create and maintain recipient lists within SparkPost. For example, when you send 'page' events into Segment.com, a recipient list is created for each page containing the users that visit that page.
- Everyone
- Page X visited last 7 days
- Group X members
- Screen X visited last 7 days
- Email openers last 7 days
- Email clickers last 7 days
After you have integrated Segment with your site, mobile app or server, enable SparkPost in your Segment integrations and add a SparkPost API key which you can create here.
Segment will then begin sending events to SparkPost which you can review by listing them through the SparkPost API:
curl -H "Content-type: application/json" -H "Authorization: YOUR_API_KEY" https://api.sparkpost.com/api/v1/recipient-lists
You can then begin sending transmissions to the recipients on your lists. For details, check out the SparkPost transmission API.
The recipient lists with names that end in "last N days" are time-limited to ensure content you send to them is still relevant. However, we expect you to consider carefully whether and what to send to your users on these lists. Here are a few important points to consider:
- opt in: you can gathering user data so you must obtain their permission before you use it or make contact
- timeliness: segment events are ephemeral - avoid using stale events to trigger contact.