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
Clone this repository locally, execute the following script to generate `aws-clickstream-web-x.x.x.tgz` zip package, which will be located in the project root folder.
168
+
Clone this repository locally and execute the following script to generate `aws-clickstream-web-0.2.0.tgz` zip package, which will be located in the project root folder.
169
169
```bash
170
-
cd clickstream-web && npm run pack
170
+
cd clickstream-web && npm i && npm run pack
171
171
```
172
172
173
-
Copy the `aws-clickstream-web-x.x.x.tgz` into your project, then execute the following script in your project root folder to install the SDK.
173
+
Copy the `aws-clickstream-web-0.2.0.tgz` into your project, then execute the script in your project root folder to install the SDK.
174
174
```bash
175
-
npm install ./aws-clickstream-web-x.x.x.tgz
175
+
npm install ./aws-clickstream-web-0.2.0.tgz
176
176
```
177
-
Note: Please correct the SDK version and change the path to where the `aws-clickstream-web-x.x.x.tgz` file is located.
177
+
**Note**: Please correct the SDK version and change the path to where the `aws-clickstream-web-0.2.0.tgz` file is located.
178
178
179
-
**Test**
179
+
### Integrate the `clickstream-web.min.js` file
180
+
Execute the following script to generate `clickstream-web.min.js`, located in the `/dist` folder.
181
+
```bash
182
+
cd clickstream-web && npm i && npm run pack
183
+
```
184
+
Copy the `clickstream-web.min.js` into your project and add the following initial code into your `index.html`.
185
+
186
+
```html
187
+
<scriptsrc="clickstream-web.min.js"></script>
188
+
<script>
189
+
window.ClickstreamAnalytics.init({
190
+
appId:'your appId',
191
+
endpoint:'https://example.com/collect',
192
+
isLogEvents:true,
193
+
pageType:window.PageType.SPA, //multiPageApp
194
+
sendMode:window.SendMode.Batch, //Immediate
195
+
})
196
+
</script>
197
+
```
198
+
You can also find the `clickstream-web.min.js` file in the [Release](https://github.com/awslabs/clickstream-web/releases) page.
0 commit comments