@cookieless-tech/install
v0.0.0
Published
Install wizard for Cookieless Analytics — adds the tracking snippet to your project
Maintainers
Readme
@cookieless-tech/install
Install wizard for Cookieless Analytics. Run it from your project root and it adds the tracking snippet for you:
npx @cookieless-tech/install <site-id>Find your site ID on the dashboard's install page. With no arguments, the wizard prompts for it.
What it does
- Next.js (app router) — adds a
next/scripttag to your rootlayoutfile. - Next.js (pages router) — injects the snippet into
pages/_document, creating it if missing. - Vite / CRA / static sites — inserts the snippet before
</head>inindex.htmlorpublic/index.html. - Anything else — prints the snippet with manual instructions.
The wizard is idempotent: if the snippet is already present, it does nothing.
Options
| Flag | Description |
| --- | --- |
| --site-id <id> | Site ID (also accepted as a positional argument) |
| --consent | Add data-consent-required="true" for GDPR consent mode |
| --dry-run | Print the resulting file without writing |
| -h, --help | Show help |
