@aman-sagar06077/zappa-analytics 0.1.1 → 0.1.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.
- package/README.md +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,10 +12,16 @@ npm i @aman-sagar06077/zappa-analytics
|
|
|
12
12
|
import { Analytics } from '@aman-sagar06077/zappa-analytics/next';
|
|
13
13
|
|
|
14
14
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
15
|
-
return <html><body>{children}<Analytics
|
|
15
|
+
return <html><body>{children}<Analytics
|
|
16
|
+
projectId={process.env.NEXT_PUBLIC_ZAPPA_PROJECT_ID!}
|
|
17
|
+
writeKey={process.env.NEXT_PUBLIC_ZAPPA_WRITE_KEY!}
|
|
18
|
+
endpoint={process.env.NEXT_PUBLIC_ZAPPA_ORIGIN + '/api/events'}
|
|
19
|
+
/></body></html>;
|
|
16
20
|
}
|
|
17
21
|
```
|
|
18
22
|
|
|
23
|
+
Copy the project-specific `NEXT_PUBLIC_ZAPPA_PROJECT_ID`, `NEXT_PUBLIC_ZAPPA_WRITE_KEY`, and `NEXT_PUBLIC_ZAPPA_ORIGIN` values from Zappa's Installation setup into `.env.local` and your production hosting environment. These values are public browser configuration; the write key scopes events to one project and is not a secret.
|
|
24
|
+
|
|
19
25
|
## Any JavaScript site
|
|
20
26
|
|
|
21
27
|
```js
|