Skip to content

Commit 3c500a3

Browse files
committed
Update sample payloads
1 parent 056f5a3 commit 3c500a3

File tree

1 file changed

+20
-67
lines changed

1 file changed

+20
-67
lines changed

src/engage/trait-activation/trait-enrichment.md

Lines changed: 20 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -59,71 +59,35 @@ Here's an example Identify call payload with traits in the `traits object`:
5959

6060
```json
6161
{
62-
"anonymousId": "507f191e810c19729de860ea",
63-
"channel": "browser",
64-
"context": {
65-
"ip": "8.8.8.8",
66-
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"
67-
},
68-
"integrations": {
69-
"All": false,
70-
"Mixpanel": true,
71-
"Salesforce": true
72-
},
73-
"messageId": "022bb90c-bbac-11e4-8dfc-aa07a5b093db",
74-
"receivedAt": "2015-02-23T22:28:55.387Z",
75-
"sentAt": "2015-02-23T22:28:55.111Z",
76-
"timestamp": "2015-02-23T22:28:55.111Z",
62+
"messageId": "segment-test-message-uozjhr",
63+
"timestamp": "2024-02-22T22:11:15.595Z",
64+
"type": "identify",
65+
"email": "[email protected]",
66+
"projectId": "5kXbpcJxms8WWaEdQUkRWc",
7767
"traits": {
78-
"name": "John Smith",
79-
"email": "[email protected]",
80-
"plan": "premium",
81-
"logins": 5,
82-
"address": {
83-
"street": "6th St",
84-
"city": "San Francisco",
85-
"state": "CA",
86-
"postalCode": "94103",
87-
"country": "USA"
88-
}
68+
"trait1": 1,
69+
"trait2": "test",
70+
"trait3": true
8971
},
90-
"type": "identify",
91-
"userId": "97980cfea0067",
92-
"version": "1.1"
72+
"userId": "test-user-cq8idf"
9373
}
9474
```
9575
And here's an example Track call payload with traits in the `properties object`:
9676

9777
```json
9878
{
99-
"anonymousId": "23adfd82-aa0f-45a7-a756-24f2a7a4c895",
100-
"context": {
101-
"library": {
102-
"name": "analytics.js",
103-
"version": "2.11.1"
104-
},
105-
"page": {
106-
"path": "/academy/",
107-
"referrer": "",
108-
"search": "",
109-
"title": "Analytics Academy",
110-
"url": "https://segment.com/academy/"
111-
},
112-
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36",
113-
"ip": "108.0.78.21"
114-
},
115-
"event": "Course Clicked",
116-
"integrations": {},
117-
"messageId": "ajs-f8ca1e4de5024d9430b3928bd8ac6b96",
79+
"messageId": "segment-test-message",
80+
"timestamp": "2024-02-22T22:10:13.640Z",
81+
"type": "track",
82+
"email": "[email protected]",
83+
"projectId": "5kXbpcJxms8WWaEdQUkRWc",
11884
"properties": {
119-
"title": "Intro to Analytics"
85+
"property1": 1,
86+
"property2": "test",
87+
"property3": true
12088
},
121-
"receivedAt": "2015-12-12T19:11:01.266Z",
122-
"sentAt": "2015-12-12T19:11:01.169Z",
123-
"timestamp": "2015-12-12T19:11:01.249Z",
124-
"type": "track",
125-
"userId": "AiUGstSDIg",
126-
"originalTimestamp": "2015-12-12T19:11:01.152Z"
89+
"userId": "test-user-1tgg9e",
90+
"event": "Segment Test Event Name"
12791
}
12892
```
12993

@@ -187,18 +151,7 @@ After you add traits, configure how your selected traits will map to your Destin
187151
- To update a trait field mapping, click on a field, and in the dropdown search bar enter `traits.` followed by your trait. For example, `traits.email`. Then, click **Use as an event variable**.
188152
4. Click **Save** and navigate back to Engage to finish building your Audience.
189153

190-
For Track events, Segment sends traits you select for enrichment in the `properties object` in a Track call.
191-
- For example: `properties.trait_1`, `properties.trait_2`
192-
193-
For Identify events, Segment sends traits you select for enrichment in the `traits object` in Identify calls.
194-
- For example: `traits.trait_1`, `traits.trait_2`
195-
196-
<!-- hold on this for now
197-
When a sample event from **Load Test Event from Source** is available, the dropdowns under the mappings will include traits configured previously.
198-
199-
![Load a test event from your source](/docs/engage/images/test-event-from-source.png)
200-
201-
-->
154+
Segment sends traits you select for enrichment in the traits object in Identify calls (`traits.trait_1`, `traits.trait_2`), and as properties in the properties object in Track calls (`properties.trait_1`, `properties.trait_2`).
202155

203156
## Best practices
204157

0 commit comments

Comments
 (0)