@nagoorkani/session-capture-vue 0.1.0 → 0.1.1

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 @@ Session capture and observability for Vue 3 applications. The capture itself is
4
4
  [`@nagoorkani/session-capture-core`](../core/README.md), shared with the Expo SDK; this
5
5
  package is the browser and the Vue of it.
6
6
 
7
- Not published to npm yet — install the directory from a checkout.
7
+ ```bash
8
+ npm install @nagoorkani/session-capture-vue
9
+ ```
8
10
 
9
11
  ## Setup
10
12
 
@@ -21,6 +23,10 @@ createApp(App)
21
23
  projectId: 'project_…',
22
24
  endpoint: 'https://your-ingestion-host',
23
25
  appVersion: '1.4.0',
26
+ // Optional: your signed-in user, recorded on every session. Leave out
27
+ // for anonymous visitors; call identify() after a later login.
28
+ appUserId: currentUser?.id,
29
+ appUserEmail: currentUser?.email,
24
30
  // Optional: route changes become screen views. Passed in rather than
25
31
  // imported, so the SDK never makes vue-router a dependency of an
26
32
  // application that routes some other way.
@@ -43,7 +49,7 @@ would capture every request that process makes for every visitor at once.
43
49
  import { track, screen, identify, breadcrumb, captureException } from '@nagoorkani/session-capture-vue'
44
50
 
45
51
  track('checkout_started', { cart: 3 })
46
- identify('user_42', { plan: 'pro' })
52
+ identify('user_42', { email: 'ana@example.com', plan: 'pro' })
47
53
  breadcrumb('coupon applied')
48
54
  captureException(error, { where: 'checkout' })
49
55
  ```
package/dist/index.js CHANGED
@@ -211,7 +211,7 @@ export const screen = safe((name) => {
211
211
  }, undefined, 'screen');
212
212
  /** Attach a known user to this session. The erasure target. */
213
213
  export const identify = safe((userId, traits) => {
214
- core?.capture('user_action', { action: 'identify', userId, ...traits });
214
+ core?.identify(userId, traits);
215
215
  persistSession();
216
216
  }, undefined, 'identify');
217
217
  /** Send everything held right now. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nagoorkani/session-capture-vue",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Session capture and observability for Vue 3 applications",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "analytics"
26
26
  ],
27
27
  "dependencies": {
28
- "@nagoorkani/session-capture-core": "0.1.0"
28
+ "@nagoorkani/session-capture-core": "0.1.4"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "vue": ">=3.3"