Skip to content

Commit

Permalink
fix: update reademe
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweii committed Oct 27, 2023
1 parent 0d1e3c1 commit 4b089e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ClickstreamAnalytics.setUserAttributes({
When opening for the first time after integrating the SDK, you need to manually set the user attributes once, and current login user's attributes will be cached in localStorage, so the next time browser open you don't need to set all user's attribute again, of course you can use the same api `ClickstreamAnalytics.setUserAttributes()` to update the current user's attribute when it changes.

#### Add global attribute
1. Add global attribute when initialize SDK
1. Add global attributes when initializing the SDK

```typescript
ClickstreamAnalytics.init({
Expand All @@ -90,7 +90,7 @@ When opening for the first time after integrating the SDK, you need to manually
});
```

2. Add global attribute after initialize SDK
2. Add global attributes after initializing the SDK

``` typescript
ClickstreamAnalytics.setGlobalAttributes({
Expand All @@ -99,7 +99,7 @@ When opening for the first time after integrating the SDK, you need to manually
});
```

It is recommended to set global attributes when initialize SDK, global attributes will be included in all events that occur after it is set, you also can remove a global attribute by setting its value to `null`.
It is recommended to set global attributes when initializing the SDK, global attributes will be included in all events that occur after it is set, you also can remove a global attribute by setting its value to `null`.

#### Record event with items

Expand Down

0 comments on commit 4b089e3

Please sign in to comment.