@ascendkit/nextjs 0.3.1 → 0.3.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-analytics.d.ts","sourceRoot":"","sources":["../../src/client/use-analytics.ts"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY;mBAkFhB,MAAM,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;EAsBvD"}
1
+ {"version":3,"file":"use-analytics.d.ts","sourceRoot":"","sources":["../../src/client/use-analytics.ts"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY;mBAkFhB,MAAM,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;EAoBvD"}
@@ -119,12 +119,11 @@ export function useAnalytics() {
119
119
  const userId = userIdRef.current;
120
120
  if (!userId)
121
121
  return;
122
- const context = getBrowserContext();
123
- const prefixedEvent = event.startsWith("app.") ? event : `app.${event}`;
124
122
  queueRef.current.push({
125
- event: prefixedEvent,
123
+ event,
126
124
  userId,
127
- properties: { ...properties, _context: context },
125
+ properties,
126
+ context: getBrowserContext(),
128
127
  timestamp: new Date().toISOString(),
129
128
  });
130
129
  if (queueRef.current.length >= BATCH_SIZE) {
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.3.1";
1
+ export declare const SDK_VERSION = "0.3.2";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.3.1";
1
+ export const SDK_VERSION = "0.3.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ascendkit/nextjs",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "AscendKit SDK for Next.js and React",
5
5
  "author": "ascendkit.dev",
6
6
  "license": "MIT",