Skip to content

Commit 35c9d46

Browse files
authored
Computed Traits Review [DOC-1201]
1 parent c1306f4 commit 35c9d46

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/unify/Traits/computed-traits.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Computed Traits allow you to quickly create user or account-level calculations t
1818
1919
{% include content/trait-types.md %}
2020

21-
## Types of Computed Traits
21+
## Types of computed traits
2222

2323
Segment currently supports the following types of computed traits:
2424
- [Types of Computed Traits](#types-of-computed-traits)
@@ -41,7 +41,7 @@ Segment currently supports the following types of computed traits:
4141
> warning "Event Properties per Computed Trait limit"
4242
> Segment limits the number of Event Properties on each Computed trait to 10,000. If your Computed Trait exceeds this limit, Segment will not persist any new Event Properties and will drop new trait keys and corresponding values.
4343
44-
### Event Counter
44+
### Event counter
4545

4646
An Event Counter trait stores a count of an **event** over a period of time. For example, you can create a trait called `number_logins_90_days` based on a `User Logged In` event. You can also use event properties to only specific types of events.
4747

@@ -69,9 +69,9 @@ Account-level use cases
6969

7070
![An aggregation trait run over the course of 90 days](../images/1525835663131.png)
7171

72-
### Most Frequent
72+
### Most frequent
7373

74-
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.
74+
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.
7575

7676
User-level examples:
7777
- Favorite Blog Post
@@ -113,7 +113,7 @@ Account-level examples:
113113
![The last event-seen trait builder](../images/1525836818177.png)
114114

115115

116-
### Unique List
116+
### Unique list
117117

118118
Unique list computed traits will output a **list of unique values** in alphabetical order for an **event property**. This is helpful to understand the different types of products or content that a customer or users in an account have interacted with or purchased. Customers are creating traits like `unique_product_categories_viewed` and sending them to email marketing tools and accessing them through the Profiles API for in-app personalization.
119119

@@ -125,7 +125,7 @@ Example use cases:
125125
![The unique list trait builder](../images/1525837083070.png)
126126

127127

128-
### Unique List Count
128+
### Unique list count
129129

130130
Unique list count computed traits will output a **count of the unique list of values** for an **event property**. Customers are creating traits like `unique_product_categories_viewed_count` to understand the variety of products that a customer is viewing. At the account-level, customers are creating traits like `unique_visitors_count` to calculate the number of unique visitors by ip address.
131131

@@ -144,7 +144,7 @@ Account-level examples:
144144

145145
All computed trait types support a common "Add Conditions" section. Conditions defined here restrict the messages considered when calculating the final value of the computed trait by looking at a property of the events. For example, you could limits events to only those where "price" is greater than 30.00 or where "page.url" contains "pricing".
146146

147-
The following operators are available.
147+
The following operators are available:
148148
- equals
149149
- not equals
150150
- less than
@@ -162,15 +162,15 @@ The following operators are available.
162162
- equals one of
163163
- contains one of
164164

165-
## Connecting your Computed Trait to a Destination
165+
## Connecting your computed trait to a destination
166166

167167
Segment 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.
168168

169169
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`.
170170

171-
Learn more about [Computed trait generated events here](/docs/engage/using-engage-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 Engage-compatible destinations](/docs/engage/using-engage-data/#compatible-engage-destinations)
171+
See [Computed trait generated events](/docs/engage/using-engage-data/#computed-trait-generated-events) to learn more. 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 Engage-compatible destinations](/docs/engage/using-engage-data/#compatible-engage-destinations).
172172

173-
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/engage/audiences/account-audiences) for more information.
173+
For account-level computed traits, you have the option to send either a [Group](/docs/connections/spec/group/) call and/or an [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. As 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/engage/audiences/account-audiences) for more information.
174174

175175
> warning "Computed Traits can only be sent to Event destinations"
176176
> When Engage sends a computed trait to an [Event destinations](/docs/engage/using-engage-data/#event-destinations), it uses an Identify call to send user traits and a Group call to send account-level computed traits.
@@ -183,7 +183,7 @@ After you create a computed trait, use the Overview page to view a compute progr
183183
> info "Viewing compute progress"
184184
> When you create a real-time computed trait, you'll see a progress bar, computed percentage, and status updates. For existing traits that you edit, Segment displays the compute status but not the progress bar or percentage.
185185
186-
## Editing Realtime Traits
186+
## Editing realtime traits
187187

188188
Segment supports the editing of real-time 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.
189189

@@ -200,7 +200,7 @@ Segment then processes your Trait edits. While the edit task runs, the trait rem
200200
> warning ""
201201
> It is not possible to edit a trait to convert it from real-time to batch, or vice-versa. If the computation type needs to be changed, you will need to recreate the trait with the appropriate conditions.
202202
203-
## Accessing your Computed Traits using the Profiles API
203+
## Accessing your computed traits using the Profiles API
204204

205205
You can access your computed traits using the Profile API by querying the `/traits` endpoint. For example, you can query for the `emails_opened_last_30_days` with the following GET request:
206206

@@ -231,13 +231,13 @@ By default, the response includes 20 traits. You can return up to 200 traits by
231231

232232
You can read the [full Profile API docs](/docs/unify/profile-api/) to learn more.
233233

234-
## Deleting Computed Traits
234+
## Deleting computed traits
235235

236236
When computed traits are deleted, any user that had a value for that trait will now have a custom trait on the Unify profile.
237237

238-
## Downloading your Computed Trait as a CSV file
238+
## Downloading your computed trait as a CSV file
239239

240-
You can download a copy of your trait by visiting the the computed trait overview page.
240+
You can download a copy of your trait by visiting the computed trait overview page.
241241
![Downloading a CSV file of computed traits in Segment](../images/trait_overview.png)
242242
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:
243243
- **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](/docs/engage/files/trait_csv_format_a.csv)
@@ -247,7 +247,7 @@ Computed Trait CSVs are generated on demand. Before you can download the CSV, yo
247247
<tr>
248248
<td>![Handling large CSV file downloads](../images/large_trait_csv.png)</td>
249249
<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.
250-
(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>
250+
(If the trait recalculates between when you click Generate and when you download the file, regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated.)</td>
251251
</tr>
252252
</table>
253253

0 commit comments

Comments
 (0)