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
Note: for beta version we use GitHub repository to distribute our SDK.
26
+
Execute the following script to Generate `clickstream-web-x.x.x.tgz` zip package, which will be located in the project root folder.
27
+
```bash
28
+
cd clickstream-web && npm run build && npm run pack
29
+
```
30
+
31
+
Copy the `clickstream-web-x.x.x.tgz` into your project, then execute the following script in your project root folder to install the SDK.
32
+
```bash
33
+
npm install ./clickstream-web-x.x.x.tgz
34
+
```
35
+
Note: Please correct the SDK version and change the path to where the `clickstream-web-x.x.x.tgz` file is located.
26
36
27
-
**2.Initialize the SDK**
28
-
You need to configure the SDK with default information before using it. Copy yourconfiguration code from your clickstream solution control plane, the configuration code will as follows:
37
+
### Initialize the SDK
38
+
You need to configure the SDK with default information before using it. Copy yourconfiguration code from your clickstream solution control plane, the configuration code should look like as follows. You can also manually add this code snippet and replace the values of appId and endpoint after you registered app to a data pipeline in the Clickstream Analytics solution console.
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 update the current user's attribute when it changes.
88
+
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.
79
89
80
-
#### Other configuration
90
+
#### Other configurations
81
91
In addition to the required `appId` and `endpoint`, you can configure other information to get more customized usage:
82
92
83
93
```typescript
@@ -110,12 +120,12 @@ Here is an explanation of each property:
110
120
- **isTrackSearchEvents**: whether auto record search result page events in browser, default is `true`
111
121
- **isTrackScrollEvents**: whether auto record page scroll events in browser, default is `true`
112
122
- **pageType**: the website type, `SPA` for single page application, `multiPageApp` for multiple page application, default is `SPA`. This attribute works only when the attribute `isTrackPageViewEvents`'s value is `true`.
113
-
- **isLogEvents**: whether log events json, default is false.
123
+
- **isLogEvents**: whether to print out event json for debugging, default is false.
114
124
- **authCookie**: your auth cookie for AWS application load balancer auth cookie.
115
125
- **sessionTimeoutDuration**: the duration for session timeout millisecond, default is 1800000
116
126
117
127
#### Configuration update
118
-
You can update the default configuration after initializing the SDK. We now support updating the following parameters:
128
+
You can update the default configuration after initializing the SDK, below are the additional configuration options you can customize.
0 commit comments