Skip to content

docs: inject Plausible analytics into example sites via CI - #478

Merged
aboydnw merged 1 commit into
mainfrom
docs/plausible-examples
Apr 24, 2026
Merged

aboydnw merged 1 commit into
mainfrom
docs/plausible-examples

Conversation

@aboydnw

@aboydnw aboydnw commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

This adds a CI step that injects the same Plausible script already used on the docs site into every example index.html after build. New examples added in the future are covered automatically with no additional changes required.

To verify, after deploy:

  • Check page source on any example (e.g. /deck.gl-raster/examples/cog-basic/) for the <script async src="https://plausible.io/js/pa-..."> tag
  • Confirm pageviews appear in the Plausible dashboard.

@aboydnw
aboydnw requested a review from kylebarron April 24, 2026 20:38
@github-actions github-actions Bot added the docs label Apr 24, 2026

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach

  • Automatically handles all examples without a manual approach
  • Not something that clutters the sources of any example, so end users who might copy an example won't get plausible automatically

@aboydnw
aboydnw merged commit 0ffe155 into main Apr 24, 2026
3 checks passed
@aboydnw
aboydnw deleted the docs/plausible-examples branch April 24, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants