Skip to content

Commit 2375214

Browse files
committed
cleanup
1 parent e9ed4c0 commit 2375214

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ Amplitude supports assigning users to groups, and performing queries such as cou
235235

236236
In the above example, 'orgId' is a `groupType`, and the value 10 or 15 is the `groupName`. Another example of a `groupType` could a sport that the user participates in, and possible `groupNames` within that type would be tennis, baseball, etc.
237237

238-
You can use `setGroup(groupType, groupName)` to designate which groups a user belongs to. Few things to note: this will also set the `groupType: groupName` as a user property. This will overwrite any existing groupName value set for that user's groupType. For example if Joe was in orgId 10, and you call `setGroup('orgId', 20)`, 20 would replace 10. You can also call `setGroup` multiple times with different groupTypes to add a user to different groups. For example Sue is in orgId: 15, and she also plays sport: soccer. Now when querying, you can Count By both orgId and sport. You are allowed to set up to 5 different groupTypes per user. Any more than that will be ignored from the query UI, although they will still appear as user properties.
238+
You can use `setGroup(groupType, groupName)` to designate which groups a user belongs to. Few things to note: this will also set the `groupType: groupName` as a user property. **This will overwrite any existing groupName value set for that user's groupType, as well as the corresponding user property value.** For example if Joe was in orgId 10, and you call `setGroup('orgId', 20)`, 20 would replace 10. You can also call `setGroup` multiple times with different groupTypes to add a user to different groups. For example Sue is in orgId: 15, and she also plays sport: soccer. Now when querying, you can Count By both orgId and sport. **You are allowed to set up to 5 different groupTypes per user.** Any more than that will be ignored from the query UI, although they will still appear as user properties.
239239

240240
```javascript
241241
amplitude.setGroup('orgId', 15);
242242
amplitude.setGroup('sport', 'tennis');
243243
```
244244

245-
You can also use `logEventWithGroups` to set event-level groups, meaning the group designation only applies for the specific event being logged.
245+
You can also use `logEventWithGroups` to set event-level groups, meaning the group designation only applies for the specific event being logged and does not persist on the user unless you explicitly set it with `setGroup`.
246246

247247
```javascript
248248
var eventProperties = {

0 commit comments

Comments
 (0)