Skip to content

Commit 99c882d

Browse files
committed
let's just get a preview going [netlify-build]
1 parent 8718f6e commit 99c882d

File tree

1 file changed

+62
-6
lines changed

1 file changed

+62
-6
lines changed

src/engage/event-mapping-configuration.md

+62-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This guide explains how to configure mappings for Engage events in Actions Desti
99

1010
Engage Mappings let you transform and send user data to downstream destinations. Engage events sent to destinations may need to be formatted or adjusted, though, to match the destination’s expected data structure. Without mapping, critical user information like audience membership or enriched traits may not sync correctly.
1111

12-
including:
12+
This guide covers:
1313

1414
- The differences between [Identify](/docs/connections/spec/identify/) and [Track](/docs/connections/spec/track/) events.
1515
- How to extract and map data from Engage event payloads.
@@ -63,7 +63,7 @@ Key characteristics:
6363

6464
- Identify events store user details in the `traits` object.
6565
- Audience membership (for example, `browse_abandoners = true`) is also included in `traits`.
66-
- Attributes like `email`, `first_name`, and any enriched traits all appear alongside audience flags.
66+
- Attributes like `email`, `first_name`, and any enriched traits appear together with audience membership information.
6767

6868
Here's an example of an Engage Identify event payload:
6969

@@ -83,8 +83,6 @@ Here's an example of an Engage Identify event payload:
8383

8484
In this example, a user just entered the `browse_abandoners` audience. If the value for the audience were `false`, it would mean the user just **exited** the audience.
8585

86-
<!-- PW: hm should I change this from "alongside audience flags!-->
87-
8886
### Track events: logging user actions
8987

9088
Track events, on the other hand, represent something the user did. These events capture user actions and log events and behaviors.
@@ -144,7 +142,7 @@ The following table summarizes the differences between Identify and Track events
144142

145143
## Configure mappings
146144

147-
To send Engage event data to a destination, you’ll need to configure a mapping. Mappings define Segment passes fields like `traits.email` or `properties.browse_abandoners` to the destination's API endpoint.
145+
To send Engage event data to a destination, you’ll need to configure a mapping. A mapping defines how Segment passes fields from Engage events (like `traits.email` or `properties.browse_abandoners`) to the format your destination expects.
148146

149147
When you add a mapping, you’ll choose the event type (Identify or Track) and then define which fields to send and where to send them. The structure of the event payload depends on the type of event, which is why mapping an Identify event differs from mapping a Track event.
150148

@@ -271,4 +269,62 @@ Trait Enrichment lets you pull Segment profile traits into mappings when syncing
271269
To enable trait enrichment:
272270

273271
1. From your Segment workspace, go to **Engage > Audiences**.
274-
2.
272+
2. Choose an audience, then select a destination from the audience overview tab.
273+
3. In the destination side panel, click **Traits and identifiers**.
274+
4. Add identifiers and/or traits, then click **Save**.
275+
276+
Enriched Identify events include traits in the `traits` object, and enriched Track events include traits in the `properties` object, like in these examples:
277+
278+
{% codeexample %}
279+
{% codeexampletab Enriched Identify event payload%}
280+
```json
281+
{
282+
"anonymousId": "anon-test-1",
283+
"traits": {
284+
"email": "[email protected]",
285+
"browse_abandoners": true,
286+
"enriched_trait_1": "value_1",
287+
"enriched_trait_2": "value_2"
288+
},
289+
"type": "identify",
290+
"userId": "user-testing-1"
291+
}
292+
```
293+
{% endcodeexampletab %}
294+
295+
{% codeexampletab Enriched Track event payload %}
296+
```json
297+
{
298+
"anonymousId": "anon-test-1",
299+
"context": {
300+
"traits": {
301+
"email": "[email protected]"
302+
}
303+
},
304+
"event": "Audience Entered",
305+
"properties": {
306+
"browse_abandoners": true,
307+
"enriched_trait_1": "enriched_trait_value_1",
308+
"enriched_trait_2": "enriched_trait_value_2"
309+
},
310+
"type": "track",
311+
"userId": "user-testing-1"
312+
}
313+
314+
```
315+
{% endcodeexampletab %}
316+
{% endcodeexample %}
317+
318+
## Troubleshooting
319+
320+
#### Why can't I find the email in my Track event properties?
321+
322+
For Track events, `email` is located in context.traits.email, not in the `properties` object. Make sure to map `context.traits.email` to your destination's email field.
323+
324+
#### How do I know whether to use an Identify or Track event?
325+
326+
The event type you use depends on your destination. Some destinations work better with Identify events for updating user profiles, while others prefer Track events to trigger actions. Read the destination's documentation to learn more about what event types will work best for your use case.
327+
328+
#### My destination fields aren't being populated correctly. What should I check?
329+
330+
Verify that you're mapping from the correct location in the event. For Identify events, look in the `traits` object. For Track events, most fields are in the `properties` object, except for `email`, which is in `context.traits`.

0 commit comments

Comments
 (0)