@aman-sagar06077/zappa-analytics 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.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -24,4 +24,6 @@ const analytics = init({ projectId: 'YOUR_PROJECT_ID', writeKey: 'Zappa_YOUR_PRO
24
24
  analytics.track('signup_completed', { plan: 1 });
25
25
  ```
26
26
 
27
+ The SDK defaults to Zappa's hosted collector at `https://www.zappa.in/api/events`. Override `endpoint` only when using a different collector.
28
+
27
29
  Only initialize analytics when your consent policy permits it. Pass `enabled={false}` to the Next.js component until consent is granted, then render it with `enabled` set to `true`. `init` fails closed without a valid write key. The package tracks initial navigation, History API push/replace, query-only changes and browser back/forward, suppressing duplicate pageviews. It shares a persistent first-party visitor and session hint across tabs; the collector assigns the authoritative session after 30 minutes of inactivity or at a UTC day boundary. Use `analytics.reset()` to start a fresh anonymous identity and `analytics.optOut()` to stop collection and clear identifiers. Events are sent in batches of up to 20 and retried on transient network failures.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const DEFAULT_ENDPOINT = 'https://Zappa-bice.vercel.app/api/events';
1
+ const DEFAULT_ENDPOINT = 'https://www.zappa.in/api/events';
2
2
  const VISITOR_KEY = 'Zappa_visitor';
3
3
  const SESSION_KEY = 'Zappa_session';
4
4
  const IDLE_MS = 30 * 60 * 1000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aman-sagar06077/zappa-analytics",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Privacy-aware website analytics for Zappa projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",