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/connections/spec/common.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,10 +276,10 @@ Other libraries only collect `context.library`, any other context variables must
276
276
| screen.height || ✅ | ✅ |
277
277
| screen.width || ✅ | ✅ |
278
278
| traits || ✅ | ✅ |
279
-
| userAgent | ✅ |✅| ✅ |
279
+
| userAgent | ✅ || ✅ |
280
280
| timezone || ✅ | ✅ |
281
281
282
-
- IP Address is not collected by Segment's libraries, but instead filled in by Segmen'ts servers when it receives a message for **client side events only**.
282
+
- IP Address isn't collected by Segment's libraries, but is instead filled in by Segment's servers when it receives a message for **client side events only**.
283
283
- The Android library collects `screen.density` with [this method](/docs/connections/spec/common/#context-fields-automatically-collected).
Copy file name to clipboardExpand all lines: src/engage/profiles/user-subscriptions/set-user-subscriptions.md
+25-13Lines changed: 25 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,25 +47,37 @@ For example, a user might reach out to you after accidentally unsubscribing to y
47
47
48
48
-->
49
49
50
-
## Managing user subscriptions with Segment APIs
50
+
## Manage user subscriptions with Segment APIs
51
51
52
-
Use Segment’s APIs to manage user subscriptions programmatically on an ongoing, real-time basis. You can choose between a [standard `track` call](/docs/connections/spec/track/), for non-critical subscription updates, or the [Public API](https://api.segmentapis.com/docs/){:target="_blank"}, for critical updates that require immediate confirmation, like unsubscribes.
52
+
With Segment's APIs, you can manage user subscriptions programmatically on a real-time basis. Use the APIs for ongoing subscription status updates, like when users subscribe to your marketing campaigns on a website form or modify their subscription from within a notification center.
53
53
54
-
Managing subscriptions with Segment's APIs allows you to handle continuous updates of subscription statuses, like when users subscribe to your marketing campaigns on a website form or modify their subscription from within a notification center.
54
+
### The Track call compared to the Public API Identify call
55
55
56
-
### Receive subscription confirmation with the Public API
56
+
To update Engage user subscriptions with Segment's APIs, first choose between a [standard Track call](/docs/connections/spec/track/), for non-critical subscription updates, or the [Public API Identify call](https://api.segmentapis.com/docs/){:target="_blank"}, for critical updates that require immediate confirmation, like unsubscribes.
57
57
58
-
To receive an API response that confirms Segment has both received and processed subscription status requests, use Segment's [Public API](https://api.segmentapis.com/docs/spaces/#replace-messaging-subscriptions-in-spaces){:target="_blank"}.
58
+
When you use the Track call, Segment replies with a standard HTTP `200 OK` status response code if it successfully received the request. Because the Track call updates user traits asynchronously, though, the `200 OK` code indicates that Segment has received, but not yet processed, the request. As a result, use the Track call for non-critical subscription updates, like form signups on your website or adding a subscription from within the user's notification center.
59
59
60
-
For example, if a user updates their subscription state in your notification center:
60
+
When you make Identify calls to Segment's Public API, however, you'll get an immediate response that confirms that Segment both received and processed the request. Use the Public API, then, for unsubscribes, so users immediately find out if their subscription updated.
61
61
62
-
1. Use the [Public API](https://api.segmentapis.com/docs/spaces/#replace-messaging-subscriptions-in-spaces){:target="_blank"} synchronous call to update their subscription state.
63
-
2. The API returns an immediate success or failure response.
64
-
3. For successful requests, Segment instantly updates subscription states in your workspace. `Subscribed` email and phone numbers will receive messages from Engage campaigns that they are a part of.
65
-
4. You can then display successful updates or error messages with users in your notification center.
62
+
### Format the Identify call payload
66
63
67
-
## The `track`call versus using the Public API
64
+
For Segment to process the subscription status request, your Identify call payload must include at least one object with a subscription contact vector, the subscription type, and the subscription status.
68
65
69
-
When you use the `track` call, Segment replies with a standard HTTP `200 OK` status response code if it successfully received the request. Because the `track` call updates user traits asynchronously, though, the `200 OK` code indicates that Segment has received, but not yet processed, the request. As a result, use the `track` call for non-critical subscription updates, like form signups on your website or adding a subscription from within the user's notification center.
66
+
The following array contains example objects that update both SMS and email subscription statuses:
70
67
71
-
When you make calls to Segment's Public API, however, you'll get an immediate response that confirms that Segment both received and processed the request. Use the Public API, then, for user unsubscribes. If a user unsubscribes from your marketing campaigns within their notification center, they'll know immediately whether or not their request was processed.
For successful requests, Segment instantly updates subscription states in your workspace. You can then display successful updates or error messages with users in your notification center.
Copy file name to clipboardExpand all lines: src/personas/computed-traits.md
+32-19Lines changed: 32 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Account-level examples:
34
34
- Total Logins by Account 30 Days
35
35
- Emails Opened by Account 90 Days
36
36
37
-

37
+

38
38
39
39
### Aggregation
40
40
@@ -48,27 +48,27 @@ Account-level use cases
48
48
- Total Minutes Watched 30 Days
49
49
- Avg Order Size Last 180 Days
50
50
51
-

51
+

52
52
53
53
### Most Frequent
54
54
55
-
A most frequent user-level computed trait will return the **most common value** for an **event property**. This is helpful to create traits like `preferred_product_viewed` or `most_commonly_viewed_category` that tell you what a user's preferred product, or content category might be. Note that the most frequent computed trait requires the event property to have been tracked at least twice. In the case of a tie, we return the first alphabetical value. For account-level computed traits, you can also return the most frequent **user trait**. This is helpful when you want to determine which user has performed an event the most frequently. For example, you might to return the email of the user in an account most actively viewing your app.
55
+
A most frequent user-level computed trait will return the **most common value** for an **event property**. This is helpful to create traits like `preferred_product_viewed` or `most_commonly_viewed_category` that tell you what a user's preferred product, or content category might be. Note that the most frequent computed trait requires the event property to have been tracked at least twice. In the case of a tie, Segment returns the first alphabetical value. For account-level computed traits, you can also return the most frequent **user trait**. This is helpful when you want to determine which user has performed an event the most frequently. For example, you might to return the email of the user in an account most actively viewing your app.
56
56
57
57
User-level examples:
58
58
- Favorite Blog Post
59
59
- Top Purchase Category
60
60
61
-

61
+

62
62
63
63
Account-level examples:
64
64
- Most frequent product viewed
65
65
- Most active user
66
66
67
-

67
+

68
68
69
69
### First
70
70
71
-
The first user-level trait returns the first event property value we have seen. This is common for creating traits like `first_page_visited` based on the page name. For accounts, the first computed trait could also return a trait like `first_user_signup`, to calculate the first user to use your product.
71
+
The first user-level trait returns the first event property value Segment has seen. This is common for creating traits like `first_page_visited` based on the page name. For accounts, the first computed trait could also return a trait like `first_user_signup`, to calculate the first user to use your product.
72
72
73
73
User-level examples:
74
74
- First seen timestamp
@@ -78,23 +78,23 @@ Account-level examples:
78
78
- First email opened
79
79
- First user signup
80
80
81
-

81
+

82
82
83
83
### Last
84
84
85
-
The last trait returns the last event property value we have seen. This is common for creating traits like `last_utm_campaign` to help you calculate last-touch attribution for paid advertising.
85
+
The last trait returns the last event property value Segment has seen. This is common for creating traits like `last_utm_campaign` to help you calculate last-touch attribution for paid advertising.
86
86
87
87
User-level examples:
88
88
- Last seen at
89
89
- Last utm parameter
90
90
91
-

91
+

92
92
93
93
Account-level examples:
94
94
- Last unsubscribe timestamp
95
95
- Last user active
96
96
97
-

97
+

98
98
99
99
### Unique List
100
100
@@ -105,7 +105,7 @@ Example use cases:
105
105
- Unique categories
106
106
- Unique games played
107
107
108
-

108
+

109
109
110
110
111
111
### Unique List Count
@@ -116,13 +116,13 @@ User-level examples:
116
116
- Unique products viewed count
117
117
- Unique categories count
118
118
119
-

119
+

120
120
121
121
Account-level examples:
122
122
- Unique products viewed
123
123
- Unique visitors count
124
124
125
-

125
+

126
126
127
127
## Conditions
128
128
@@ -148,13 +148,26 @@ The following operators are available.
148
148
149
149
Personas sends user-level computed Traits to destinations using the [Identify call](/docs/connections/spec/identify/) for user traits, or using the [Track call](/docs/connections/spec/track/) for event properties. Segment includes the trait value and property in the identify and track calls.
150
150
151
-
For example, the name of a computed trait is added to the user profile as a trait, and the trait's value is set to the value of the computed trait. Segment sends an identify or track call when the trait is computed, depending on the destination configuration. If a computed trait counts the number of times a user visits your pricing page, and the user visits your pricing page five times, Segment sends an identify call with the property `pricing_page_visits: 5`.
151
+
For example, the name of a computed trait is added to the user profile as a trait, and the trait's value is set to the value of the computed trait. Segment sends an identify or track call when the trait is computed, depending on the destination configuration. If a computed trait counts the number of times a user visits your pricing page, and the user visits your pricing page five times, Segment sends an identify call with the property `pricing_page_visits: 5`.
152
152
153
153
Learn more about [Computed trait generated events here](/docs/personas/using-personas-data/#computed-trait-generated-events). The trait name corresponds to the snake cased name that you see in the trait settings, for example `most_viewed_page_category`. See the [list of Personas-compatible destinations](/docs/personas/using-personas-data/#compatible-personas-destinations)
154
154
155
-

155
+

156
156
157
-
For account-level computed traits, you have the option to send either a [group](/docs/connections/spec/group/) call and/or [identify](/docs/connections/spec/identify/) call. Group calls will send one event per account, whereas identify calls will send an identify call for each user in the account. This means that even if a user hasn't performed an event, we will still set the account-level computed trait on that user. Because most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/personas/audiences/account-audiences) for more information.
157
+
For account-level computed traits, you have the option to send either a [group](/docs/connections/spec/group/) call and/or [identify](/docs/connections/spec/identify/) call. Group calls will send one event per account, whereas identify calls will send an identify call for each user in the account. This means that even if a user hasn't performed an event, Segment will still set the account-level computed trait on that user. Because most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/personas/audiences/account-audiences) for more information.
158
+
159
+
## Editing Realtime Traits
160
+
161
+
Personas supports the editing of realtime Traits, which allows you to make nuanced changes to existing Traits in situations where cloning or building from scratch may not suit your use case.
162
+
163
+
To edit a realtime Trait, follow these steps:
164
+
165
+
1. In your Personas Space, select the **Computed Traits** tab.
166
+
2. Select the realtime Trait you want to edit.
167
+
3. Select the **Builder** tab and make your edits.
168
+
4. Select **Save Computed Trait** to confirm your edits.
169
+
170
+
Personas then processes your Trait edits. While the edit task runs, the trait remains locked and you can't make further changes. Once Personas has finished incorporating your changes, you'll be able to access your updated Trait.
158
171
159
172
160
173
## Accessing your Computed Traits using the Profiles API
@@ -182,17 +195,17 @@ returns:
182
195
183
196
You can read the [full Profile API docs](/docs/personas/profile-api/) to learn more.
184
197
185
-
## Downloading your Computed Trait as a CSV
198
+
## Downloading your Computed Trait as a CSV file
186
199
187
200
You can download a copy of your trait by visiting the the computed trait overview page.
188
-

201
+

189
202
Computed Trait CSVs are generated on demand. Before you can download the CSV, you will need to generate it. There are three different options for formatting:
190
203
-**Unformatted:** Contains three columns. The first contains the user or account key, the second contains the trait value and the third is a JSON object containing the external IDs. Generating this CSV is by far the fastest of the three options. [Download example unformatted CSV](files/trait_csv_format_a.csv)
191
204
-**Distinct columns for unique external IDs (with indexed columns for ID types with multiple values):** Contains the same first three columns as the unformatted CSV. Additional columns are added for each distinct external ID type. When a single row has more than one value for a given external ID type, for example a user with three email addresses, _additional columns with indexed headers are added_, (`email`, `email_1`, `email_2`). [Download example formatted CSV with indexed columns](files/trait_csv_format_b.csv)
192
205
-**Distinct columns for unique external IDs (with additional rows for ID types with multiple values):** Contains the same first three columns as the unformatted CSV. Additional columns are added for each distinct external ID type. When a single row has more than one value for a given external ID type, for example a user with two email addresses, _additional rows are added with the first three columns repeated (user or account key, trait value and external IDs JSON)._[Download example formatted CSV with additional rows](files/trait_csv_format_c.csv)
193
206
<table>
194
207
<tr>
195
-
<td></td>
208
+
<td></td>
196
209
<td width="45%">Generating a CSV can take a substantial amount of time for large traits (around 30 seconds for a formatted CSV with 1 million rows). For CSVs that are expected to take over 20 seconds, the Segment app displays an estimated generation time. After clicking Generate, it is recommended that you leave the modal and page open while the CSV is created.
197
210
(If the trait recalculates between when you click Generate and when you download the file, you might want to regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated.)</td>
0 commit comments