@usermaven/sdk-js 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,9 @@ Usermaven.js is a JavaScript SDK for [Usermaven](https://usermaven.com).
4
4
 
5
5
  ## Capabilities
6
6
 
7
- - Session Capability via `persistence` and `persistence_name` options.
7
+ - Session Capability via `persistence`, `persistence_name` and `persistence_time` options.
8
+ - Autocapturing via `autocapture`, `capture_pageview`, `properties_string_max_length` and `property_blacklist` options.
9
+ - Cross sub-domain compatibility added.
8
10
 
9
11
  ## Maintainers Guide
10
12
 
@@ -17,8 +19,7 @@ This section is indented only for package maintainers.
17
19
  * The server listens to all changes to src and rebuilds npm and `lib.js` automatically. Open test cases HTML files to see
18
20
  usermaven in action
19
21
  * http://localhost:8081/test-case/embed.html - embedded Usermaven
20
- * http://localhost:8081/test-case/embed-no-init.html - Usermaven without automatic initialization
21
- * http://localhost:8081/test-case/segment-intercept.html - test segment interception
22
+ * http://localhost:8081/test-case/autocapture.html - embedded Usermaven with autocapturing events
22
23
  * `yarn test` runs [Playwright](https://playwright.dev/) test
23
24
  * `yarn build` builds both npm package and `lib.js` browser bundle
24
25
  * `npm publish --public` to publish the package (change version in `package.json` manually). You need to run `npm login` with your personal
@@ -31,6 +32,20 @@ npmjs account beforehand (make sure you have access to Usermaven team)
31
32
  * `npm link @usermaven/sdk-js` --- use npm package locally whose symlink is just published
32
33
  * `npm start` --- start the application and monitor events
33
34
 
35
+ ### Checking Cross Domain Session locally
36
+ Setup a custom domain and sub-domain locally to test cross domain session persistence.
37
+
38
+ ```bash
39
+ sudo nano /etc/hosts
40
+ ```
41
+ Add the following lines in the hosts file
42
+ ```bash
43
+ 127.0.0.1 localhost.com
44
+ 127.0.0.1 app.localhost.com
45
+ ```
46
+
47
+ You will be able to access the domains at [localhost domain](http://localhost.com:8081/test-case/embed.html) and [localhost sub-domain](http://app.localhost.com:8081/test-case/embed.html)
48
+
34
49
  ### Publishing new version
35
50
 
36
51
  * Login with your *personal* credentials with `npm login`