analytics/tracker
Artur Pata a204c89066
Stop trying to compile detector and verifier on CE (#5857)
2025-11-03 09:22:55 +00:00
..
compiler Stop trying to compile detector and verifier on CE (#5857) 2025-11-03 09:22:55 +00:00
installation_support Clean up legacy verification code and script v2 flag (#5824) 2025-10-27 09:39:41 +00:00
npm_package Released tracker script version 0.4.4 2025-10-31 08:01:23 +00:00
src Script v2: Apply prettier (#5718) 2025-09-15 11:21:27 +00:00
test Clean up legacy verification code and script v2 flag (#5824) 2025-10-27 09:39:41 +00:00
.prettierignore Update tests transformRequest tests (#5687) 2025-09-16 05:39:17 +00:00
.prettierrc.json Script v2: Adds linter and prettier, satisfies linter (#5691) 2025-09-04 04:56:42 +00:00
ARCHITECTURE.md Script v2: Apply prettier (#5718) 2025-09-15 11:21:27 +00:00
CHANGELOG.md ScriptV2: Tracker release process, documentation (#5477) 2025-06-10 08:34:42 +00:00
LICENSE.md ScriptV2: Tracker release process, documentation (#5477) 2025-06-10 08:34:42 +00:00
README.md Script v2: Apply prettier (#5718) 2025-09-15 11:21:27 +00:00
compile.js Script v2: Apply prettier (#5718) 2025-09-15 11:21:27 +00:00
eslint.config.mjs Script v2: Adds linter and prettier, satisfies linter (#5691) 2025-09-04 04:56:42 +00:00
package-lock.json Update deps (#5837) 2025-10-28 08:44:42 +00:00
package.json Update deps (#5837) 2025-10-28 08:44:42 +00:00
playwright.config.ts Shard playwright tests, cache tracker npm deps and browsers (#5603) 2025-08-04 09:49:10 +00:00
release-update-changelog.sh ScriptV2: Tracker release process, documentation (#5477) 2025-06-10 08:34:42 +00:00

README.md

Plausible tracker

This contains Plausible tracker script and NPM package which Plausible users integrate into their site and which captures pageviews and more.

Development

See also ARCHITECTURE.md

Dependencies

To download dependencies, do:

npm install
npx playwright install # installs browsers used by playwright

Compilation

Compile tracker code by node compile.js.

Use node compile.js --watch to watch for changes.

Use node compile.js --web-snippet if you need to update web snippet code.

Tests

Tests can be run in UI mode via npm run playwright --ui. This helps with debugging.

NPM package

To test changes to the npm package by installing the local version against a test project, we recommend:

  • installing yalc via npm install yalc -g
  • compiling the tracker
  • running yalc publish in tracker/npm_package directory

More instructions can be found in yalc repo.

Cloud deployment

Handled via PRs. When making tracker changes, it's required to:

  • Tag your PR with a tracker release: label
  • Update tracker/CHANGELOG.md

After merge github actions automatically:

  • includes the updated tracker scripts in the next cloud deploy
  • updates npm package package.json and CHANGELOG.md with the new version
  • releases the new package version on NPM.