@staging-apiplus/google-analytics
v0.0.1
Published
Measure visits with Google Analytics 4.
Readme
@staging-apiplus/google-analytics
Measure visits with Google Analytics 4.
A first-party QuickPage app (app.kind: "app"). It supports the site surface: designers install it per site from Settings → Apps. The version lives in package.json and src/package.ts; keep them equal.
What it adds
- Integration: analytics, definition
ga4(Google Analytics 4). - Setting:
Measurement ID(G-XXXXXXXXXX; a pasted snippet is reduced to the ID). - Script:
gtag.jsloaded with the measurement ID, run off the main thread (csr-worker, forwardsgtaganddataLayer.push).
Permissions
site.scripts (edit). Site permissions are derived from the manifest; the app declares none.
Commands
pnpm run validate # apps validate (checks the manifest)
pnpm run build # apps build → dist/Publishing
This app is published to the @staging-apiplus npm scope with make publish-code-packages-npm from the repository root. It reaches the dev registry (Verdaccio, served through the mock registry gateway) with make publish-code-packages-dev from the repository root, or pnpm run publish:dev in this folder. pnpm run publish:npm (apps publish) is the production path.
