Skip to content

feat(docs): add Matomo analytics to documentation site#469

Merged
raymondk merged 3 commits intomainfrom
feat/docs-matomo-analytics
Mar 27, 2026
Merged

feat(docs): add Matomo analytics to documentation site#469
raymondk merged 3 commits intomainfrom
feat/docs-matomo-analytics

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented Mar 26, 2026

Summary

  • Add Matomo analytics tracking to the docs site, matching the portal's configuration (cookies disabled, link tracking enabled, same Matomo Cloud instance, site ID 21)
  • The tracking script is deployed as a single root-level file (/matomo.js) so the site ID can be updated without rebuilding existing versioned docs
  • Every page includes <script src="/matomo.js" async> via Starlight's head config

After merging

  • All existing versioned builds (/0.1/, /0.2/, /main/) need a one-time rebuild to pick up the new <script> tag
  • Future site ID changes only require updating docs-site/matomo.js — no version rebuilds needed

Test plan

  • Verified Matomo script is NOT included in local dev builds (no matomo.js at root)
  • Verified <script src="/matomo.js"> appears in build output
  • Verified Starlight does not prepend the base path (stays /matomo.js, not /0.2/matomo.js)

Add Matomo tracking to the docs site, matching the portal's setup
(cookies disabled, link tracking enabled, same Matomo Cloud instance).

The tracking script is deployed as a single root-level file (`/matomo.js`)
rather than baked into each versioned build, so the site ID can be
updated without rebuilding existing versions.

> **TODO**: Replace `CHANGEME` in `docs-site/matomo.js` with the actual
> Matomo site ID once IT creates the site for `cli.internetcomputer.org`.
@marc0olo marc0olo marked this pull request as ready for review March 26, 2026 16:35
@marc0olo marc0olo requested a review from a team as a code owner March 26, 2026 16:35
@raymondk raymondk merged commit ae885de into main Mar 27, 2026
156 of 158 checks passed
@raymondk raymondk deleted the feat/docs-matomo-analytics branch March 27, 2026 20:52
marc0olo added a commit that referenced this pull request Mar 30, 2026
* feat(docs): add Matomo analytics to documentation site

Add Matomo tracking to the docs site, matching the portal's setup
(cookies disabled, link tracking enabled, same Matomo Cloud instance).

The tracking script is deployed as a single root-level file (`/matomo.js`)
rather than baked into each versioned build, so the site ID can be
updated without rebuilding existing versions.

> **TODO**: Replace `CHANGEME` in `docs-site/matomo.js` with the actual
> Matomo site ID once IT creates the site for `cli.internetcomputer.org`.

* chore(docs): set Matomo site ID to 21

* chore(docs): add cache headers for matomo.js
marc0olo added a commit that referenced this pull request Mar 30, 2026
* feat(docs): add Matomo analytics to documentation site

Add Matomo tracking to the docs site, matching the portal's setup
(cookies disabled, link tracking enabled, same Matomo Cloud instance).

The tracking script is deployed as a single root-level file (`/matomo.js`)
rather than baked into each versioned build, so the site ID can be
updated without rebuilding existing versions.

> **TODO**: Replace `CHANGEME` in `docs-site/matomo.js` with the actual
> Matomo site ID once IT creates the site for `cli.internetcomputer.org`.

* chore(docs): set Matomo site ID to 21

* chore(docs): add cache headers for matomo.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants