Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0d341b6

Browse files
authoredOct 2, 2023
Merge pull request #5458 from segmentio/lizkane222-patch-29
Update using-engage-data.md Additional info on engage events
2 parents cc66939 + c094a17 commit 0d341b6

File tree

1 file changed

+96
-9
lines changed

1 file changed

+96
-9
lines changed
 

‎src/engage/using-engage-data.md

Lines changed: 96 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,56 +61,98 @@ User-list destinations can have individual limits on how often Segment can sync
6161

6262
The payloads sent from your Engage space to your destinations will be different depending on if you configured the destination to receive identify or track calls, and whether the payload is coming from a computed trait or audience. As a reminder, identify calls usually update a trait on a user profile or table, whereas track calls send a point-in-time event that can be used as a campaign trigger or a detailed record of when a user's audience membership or computed trait value was calculated.
6363

64+
To view the events generated by an Engage Space's audience or computed traits, navigate to **Unify settings > Debugger** and view the list of sources that are configured to generate events per [each destination instance](/docs/engage/warehouses/#why-are-there-multiple-schemas-prefixed-with-engage_-in-my-warehouse-when-i-only-have-one-space:~:text=Segment%20currently%20can,schemas%20than%20spaces.). Each source will only generate events to connected destinations. From the source's Debugger tab, you'll find the most recent events generated by that source per the connected destinations' audiences and computed traits.
65+
66+
In the full json body of an audience, computed trait, or journey, you'll find specific details under the `context.personas` object. These fields can be useful when building out [Destination Filters](/docs/connections/destinations/destination-filters/), [Actions destination mappings](/docs/connections/destinations/actions/#set-up-a-destination-action), and [Functions](/docs/connections/functions/).
67+
68+
The integrations object in the payload displays as `{"All" : false,}` and only lists some destinations. This is due to the fact that each source has multiple destinations connected while each audience/trait may only have a subset of destinations connected to it. See [Filtering with the Integrations Object](/docs/guides/filtering-data/#filtering-with-the-integrations-object) for more information. The integrations object routing specific events to its specified destinations is also why a destination's [Delivery Overview](/docs/connections/delivery-overview/) tab will show a large number of events under the [Filtered at destination](/docs/connections/delivery-overview/#:~:text=Filtered%20at%20destination%3A%20Events,will%20be%20filtered%20out.) box, as that destination will only receive the events intended to be sent to it by audiences, traits, or journeys that are connected to that specific destination.
69+
6470
### Computed Trait generated events
6571

66-
`Identify` events generated by a computed trait have the trait name set to the computed trait value:
72+
`Identify` events generated by a Computed Trait have the trait name set to the Computed Trait value:
6773

6874
```js
6975
{
76+
"context": {
77+
"personas": {
78+
"computation_class": "trait", // the type of computation
79+
"computation_id": "tra_###", // the trait's id found in the URL
80+
"computation_key": "aud_###", // the configured trait key that appears on user profile
81+
"namespace": "spa_###", // the Engage Space's ID
82+
"space_id": "spa_###" // the Engage Space's ID
83+
}
84+
},
7085
"type": "identify",
71-
"userId": u123,
86+
"userId": "u123",
7287
"traits": {
7388
"total_revenue_180_days": 450.00
7489
}
7590
}
7691
```
7792

78-
`Track` events generated by a computed trait have a key for the trait name, and a key for the computed trait value. The default event name is `Trait Computed`, but you can change it.
93+
`Track` events generated by a Computed Trait have a key for the trait name, and a key for the Computed Trait value. The default event name is `Trait Computed`, but you can change it.
7994

8095
```js
8196
{
97+
"context": {
98+
"personas": {
99+
"computation_class": "trait", // the type of computation
100+
"computation_id": "tra_###", // the trait's id found in the URL
101+
"computation_key": "aud_###", // the configured trait key that appears on user profile
102+
"namespace": "spa_###", // the Engage Space's ID
103+
"space_id": "spa_###" // the Engage Space's ID
104+
}
105+
},
82106
"type": "track",
83107
"event": "Trait Computed",
84-
"userId": u123,
108+
"userId": "u123",
85109
"properties": {
86110
"trait_key": "total_revenue_180_days",
87111
"total_revenue_180_days": 450.00
88112
}
89113
}
90114
```
91115

92-
Engage only sends events to the destination if the computed trait value has changed for the user. Engage doesn't send a payload for every user in your trait every time the trait computes.
116+
Engage only sends events to the destination if the Computed Trait value has changed for the user. Engage doesn't send a payload for every user in your trait every time the trait computes.
93117

94118
### Audience generated events
95119

96-
`Identify` events generated by an audience have the audience key set to `true` or `false` based on whether the user is entering or exiting the audience:
120+
`Identify` events generated by an Audience have the Audience key set to `true` or `false` based on whether the user is entering or exiting the audience:
97121

98122
```js
99123
{
124+
"context": {
125+
"personas": {
126+
"computation_class": "audience", // the type of computation
127+
"computation_id": "aud_###", // the audience's id found in the URL
128+
"computation_key": "aud_###", // the configured audience key that appears on user profile
129+
"namespace": "spa_###", // the Engage Space's ID
130+
"space_id": "spa_###" // the Engage Space's ID
131+
}
132+
},
100133
"type": "identify",
101-
"userId": u123,
134+
"userId": "u123",
102135
"traits": {
103136
"first_time_shopper": true // false when a user exits the audience
104137
}
105138
}
106139
```
107140

108-
`Track` events generated by an audience have a key for the audience name, and a key for the audience value:
141+
`Track` events generated by an Audience have a key for the Audience name, and for the Audience value:
109142

110143
```js
111144
{
145+
"context": {
146+
"personas": {
147+
"computation_class": "audience", // the type of computation
148+
"computation_id": "aud_###", // the audience's id found in the URL
149+
"computation_key": "aud_###", // the configured audience key that appears on user profile
150+
"namespace": "spa_###", // the Engage Space's ID
151+
"space_id": "spa_###" // the Engage Space's ID
152+
}
153+
},
112154
"type": "track",
113-
"userId": u123,
155+
"userId": "u123",
114156
"event": "Audience Entered", // "Audience Exited" when a user exits an audience
115157
"properties": {
116158
"audience_key": "first_time_shopper",
@@ -119,6 +161,51 @@ Engage only sends events to the destination if the computed trait value has chan
119161
}
120162
```
121163

164+
### Journey generated events
165+
_See [this doc](https://segment.com/docs/engage/journeys/send-data/#what-do-i-send-to-destinations) for more information on Journeys events._
166+
`Track` events generated by a journey have a key for the journey name "audience_key", and a key for the journey value:
167+
168+
```js
169+
{
170+
"context": {
171+
"personas": {
172+
"computation_class": "audience", // the type of computation
173+
"computation_id": "aud_###", // the audience's id found in the URL
174+
"computation_key": "j_o_###", // the configured journey key that appears on user profile
175+
"namespace": "spa_###", // the Engage Space's ID
176+
"space_id": "spa_###" // the Engage Space's ID
177+
}
178+
},
179+
"type": "track",
180+
"userId": "u123",
181+
"event": "Audience Entered", // "Audience Exited" when a user exits an audience
182+
"properties": {
183+
"audience_key": "j_o_###",
184+
"recent_buyer": true // false when a user exits the journey
185+
}
186+
}
187+
```
188+
189+
`Identify` events generated by a Journey have the Journey key set to `true` or `false` based on whether the user is entering or exiting the Journey:
190+
191+
```js
192+
{
193+
"context": {
194+
"personas": {
195+
"computation_class": "audience", // the type of computation
196+
"computation_id": "aud_###", // the audience's id found in the URL
197+
"computation_key": "j_o_###", // the configured journey key that appears on user profile
198+
"namespace": "spa_###", // the Engage Space's ID
199+
"space_id": "spa_###" // the Engage Space's ID
200+
}
201+
},
202+
"type": "identify",
203+
"userId": "u123",
204+
"traits": {
205+
"recent_buyer": true // false when a user exits the journey
206+
}
207+
}
208+
```
122209

123210

124211
## Additional identifiers

0 commit comments

Comments
 (0)
Please sign in to comment.