Skip to content

Commit c4946c0

Browse files
authored
Merge pull request #3086 from segmentio/2781-computed-traits-realtime-editing
Add Realtime Trait Editing Content #2781
2 parents 773722f + 84b30ec commit c4946c0

File tree

1 file changed

+32
-19
lines changed

1 file changed

+32
-19
lines changed

src/personas/computed-traits.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Account-level examples:
3434
- Total Logins by Account 30 Days
3535
- Emails Opened by Account 90 Days
3636

37-
![](images/1525835194991.png)
37+
![An event counter trait run over the course of a week](images/1525835194991.png)
3838

3939
### Aggregation
4040

@@ -48,27 +48,27 @@ Account-level use cases
4848
- Total Minutes Watched 30 Days
4949
- Avg Order Size Last 180 Days
5050

51-
![](images/1525835663131.png)
51+
![An aggregation trait run over the course of 90 days](images/1525835663131.png)
5252

5353
### Most Frequent
5454

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.
5656

5757
User-level examples:
5858
- Favorite Blog Post
5959
- Top Purchase Category
6060

61-
![](images/1525836239527.png)
61+
![A most frequent product-viewed trait](images/1525836239527.png)
6262

6363
Account-level examples:
6464
- Most frequent product viewed
6565
- Most active user
6666

67-
![](images/1542073415630.png)
67+
![A most frequent order-completed trait](images/1542073415630.png)
6868

6969
### First
7070

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.
7272

7373
User-level examples:
7474
- First seen timestamp
@@ -78,23 +78,23 @@ Account-level examples:
7878
- First email opened
7979
- First user signup
8080

81-
![](images/1525836568474.png)
81+
![The first event-seen trait builder](images/1525836568474.png)
8282

8383
### Last
8484

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.
8686

8787
User-level examples:
8888
- Last seen at
8989
- Last utm parameter
9090

91-
![](images/1525836818177.png)
91+
![The last event-seen trait builder](images/1525836818177.png)
9292

9393
Account-level examples:
9494
- Last unsubscribe timestamp
9595
- Last user active
9696

97-
![](images/1542073887657.png)
97+
![An account-level last page-viewed trait](images/1542073887657.png)
9898

9999
### Unique List
100100

@@ -105,7 +105,7 @@ Example use cases:
105105
- Unique categories
106106
- Unique games played
107107

108-
![](images/1525837083070.png)
108+
![The unique list trait builder](images/1525837083070.png)
109109

110110

111111
### Unique List Count
@@ -116,13 +116,13 @@ User-level examples:
116116
- Unique products viewed count
117117
- Unique categories count
118118

119-
![](images/1525837374378.png)
119+
![The unique list count builder](images/1525837374378.png)
120120

121121
Account-level examples:
122122
- Unique products viewed
123123
- Unique visitors count
124124

125-
![](images/1542074153487.png)
125+
![An account-level unique list trait](images/1542074153487.png)
126126

127127
## Conditions
128128

@@ -148,13 +148,26 @@ The following operators are available.
148148

149149
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.
150150

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`.
152152

153153
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)
154154

155-
![](images/1525837601768.png)
155+
![Editing a computed trait's settings](images/1525837601768.png)
156156

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.
158171

159172

160173
## Accessing your Computed Traits using the Profiles API
@@ -182,17 +195,17 @@ returns:
182195

183196
You can read the [full Profile API docs](/docs/personas/profile-api/) to learn more.
184197

185-
## Downloading your Computed Trait as a CSV
198+
## Downloading your Computed Trait as a CSV file
186199

187200
You can download a copy of your trait by visiting the the computed trait overview page.
188-
![](images/trait_overview.png)
201+
![Downloading a CSV file of computed traits in the Segment](images/trait_overview.png)
189202
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:
190203
- **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)
191204
- **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)
192205
- **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)
193206
<table>
194207
<tr>
195-
<td>![](images/large_trait_csv.png)</td>
208+
<td>![Handling large CSV file downloads](images/large_trait_csv.png)</td>
196209
<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.
197210
(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>
198211
</tr>

0 commit comments

Comments
 (0)