You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/engage/event-mapping-configuration.md
+42-14
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ Before you begin, make sure you've done the following:
157
157
- Confirmed whether the destination expects Identify or Track events
158
158
- Located your audience key (you'll use it to configure the trigger)
159
159
160
-
### Create a mapping
160
+
### 1. Create a mapping
161
161
162
162
To create a mapping, follow these steps:
163
163
@@ -168,8 +168,31 @@ To create a mapping, follow these steps:
168
168
169
169
After you select the event type, you'll configure a trigger to determine when the mapping fires (based on audience entry or exit), and then map the fields to the destination's expected format.
170
170
171
+
### 2. Define the event trigger
171
172
172
-
Map an Identify event
173
+
Before mapping fields, you’ll define a trigger that determines when the mapping executes. For Engage events, triggers typically use the audience key's boolean value.
174
+
175
+
So to trigger the mapping when a user enters or exits an audience, you'd use the audience key and its boolean value:
176
+
177
+
When a user enters the audience, configure the trigger like this:
178
+
179
+
- Trigger type: `Event Trait`
180
+
- Field: `browse_abandoners`
181
+
- Condition: `is true`
182
+
183
+
When a user exits the audience, set the trigger like this:
184
+
185
+
- Trigger type: `Event Trait`
186
+
- Field: `browse_abandoners`
187
+
- Condition: `is false`
188
+
189
+
This tells Segment to execute the mapping only when the value of the audience key changes in the appropriate direction.
190
+
191
+
### 3. Map event fields
192
+
193
+
The fields you map depend on whether you selected Identify or Track.
194
+
195
+
#### Map an Identify event
173
196
174
197
Since Identify events send data in the `traits` object, you'll use `traits` in your mappings, like in this example:
175
198
@@ -196,19 +219,10 @@ Here’s how you might configure your mapping for this Identify event:
196
219
|`traits.first_name`|`first_name`| User’s first name |
197
220
|`traits.last_name`|`last_name`| User’s last name |
| 1 | Enginer | Creates string key and wires it into the UI (like `settings.saveButton.label`) |
202
-
| 2 | Engineer | Seeds initial content into the CMS during feature development |
203
-
| 3 | Designer | Logs into the CMS and updates the content post-launch |
204
-
| 4 | Console | Loads content from the CMS at build time or runtime depending on use case |
205
-
206
-
207
222
208
223
<!-- Maybe add screenshot-->
209
224
210
-
211
-
### Map a Track event
225
+
#### Map a Track event
212
226
213
227
Track events send data in the `properties` object, like in this example:
214
228
@@ -231,7 +245,6 @@ Track events send data in the `properties` object, like in this example:
231
245
}
232
246
}
233
247
```
234
-
235
248
This event logs the moment the user entered the `browse_abandoners` audience. Audience status and [enriched traits](#) show up in `properties`, while email is stored in `context.traits`.
236
249
237
250
Here’s how you might configure your mapping for this Track event:
@@ -243,4 +256,19 @@ Here’s how you might configure your mapping for this Track event:
243
256
|`properties.first_name`|`first_name`| User’s first name |
244
257
|`properties.last_name`|`last_name`| User’s last name |
245
258
246
-
<!-- Add screenshot>
259
+
260
+
Once you've decided whether to map a Track or Identify event, finish by following these steps:
261
+
262
+
1. Load a test event or paste the event JSON into the mapping interface.
263
+
2. For each field you want to send:
264
+
- Select the source field from the left panel.
265
+
- Enter the destination field on the right.
266
+
267
+
## Trait enrichment
268
+
269
+
Trait Enrichment lets you pull Segment profile traits into mappings when syncing audiences or journeys to destinations and [Destination functions](/docs/connections/functions/destination-functions/).
270
+
271
+
To enable trait enrichment:
272
+
273
+
1. From your Segment workspace, go to **Engage > Audiences**.
0 commit comments