Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Stories Destination


Destination Info
  • Accepts Page, Identify and Track calls.
  • Refer to it as Stories in the Integrations object
  • This integration is partner owned. Please reach out to the partner's support for any issues.

Stories(link takes you to an external page) gathers all the user events that matter on a timeline, so your teams can understand what is going on and take action in the right direction.

This destination is maintained by Stories. For any issues with the destination, contact the Stories Support team.


Getting Started

getting-started page anchor
  1. From the Segment web app, click Catalog.
  2. Search for "Stories" in the Catalog, select it, and choose which of your sources to connect the destination to.
  3. Enter the "API Key" into your Settings UI which you can retrieve from your Stories Account(link takes you to an external page).
  4. You can choose whether to Sync Users or not with Stories. If you enable this setting, identified users will be automatically added and/or merged with your Stories users. Read more about Merging Users below.

identify calls are sent to Stories as a new event on a user's timeline. This call is mainly used to keep track of changes to users' profile and maintain user properties called traits in Segment. If you want to track specific user actions we recommend using the track call.

Only identify calls update the Profile traits and Attributes on the left-hand side of user profiles. track, page, and screen calls create users but don't populate user Attributes.

userId is a required property to assign the call to a specific user. Stories does not support anonymous user tracking. An example call would look like with a server-side call:

1
POST api.getstories.io/v1/events/
2
Params: {
3
user_id: "some_user_id", //Segment's userId
4
name: "Identify", //Segment's call type
5
data: {
6
traits: { //Segment's traits for the user
7
first_name: "Jacob"
8
}
9
}
10
}

page and screen calls are sent to Stories as a new event on a user's timeline as a visited Page or opened Screen. userId is a required property to assign the call to a specific user. name is a recommended field that helps identify the event characteristics but is not required. An example server-side call:

1
POST api.getstories.io/v1/events/
2
Params: {
3
user_id: "some_user_id", //Segment's userId
4
name: "Page", //Segment's call type
5
data: {
6
content: "FAQ - Help" //Segment's name
7
}
8
}
9
10
POST api.getstories.io/v1/events/
11
Params: {
12
user_id: "some_user_id", //Segment's userId
13
name: "Screen", //Segment's call type
14
data: {
15
content: "App went Foreground" //Segment's name
16
}
17
}

track calls are sent to Stories as a new event on a user's timeline to keep a track of user actions. userId is a required property to assign the call to a specific user. name is a recommended field that helps identify the event characteristics but is not required. An example server-side call:

1
POST api.getstories.io/v1/events/
2
Params: {
3
user_id: "some_user_id", //Segment's userId
4
name: "Track", //Segment's call type
5
data: {
6
content: "Remote Log session started" //Segment's name
7
}
8
}

Known & Anonymous Users

known--anonymous-users page anchor

Stories does not support anonymous users at the moment. To have Stories recognize a user, you must include userId when calling identify. Otherwise, Stories won't automatically be able to log the call under the correct user.

Merging Users

merging-users page anchor

Stories automatically merges identified Users in Segment with their corresponding Stories User and creates a new User in Stories if it does not exist already. When an identify fires, it merges/updates User attributes with the identify call's traits.

An example server-side call:

1
POST api.getstories.io/v1/users
2
Params: {
3
"user_id": "some_user_id", //Segment's userId
4
"name": "Han Solo", //Segment's username
5
"email": "han.solo@millenium.fa", //Segment's email
6
"phone": "+14155552671", //Segment's phone
7
"attributes": { //Segment's Traits
8
"vehicle": "Millennium Falcon",
9
"latest_action": "Marry Leia"
10
},
11
}

When you set up your Stories Destination in Segment, your users automatically sync to Stories. Note that only Users who have a userId in Segment are synced, Stories does not support anonymous users yet. Users are updated by identify events from Segment.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to false.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to Stories may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
API Keystring
required

Paste here the Personal Access Token you created from your Stories Account > Settings > API