Documentation

Plausible Analytics

Last updated May 10, 2026

Plausible Analytics is a privacy-friendly, cookieless analytics product with a lightweight script loader. The plausibleAnalytics() helper models Plausible's queue bootstrap and script attributes as a c15t-managed script so early window.plausible(...) calls are buffered safely until the tracker loads.

Integrate with c15t

How c15t loads it

  • Category: measurement (Analytics)
  • Loads when: measurement consent is granted
  • On revocation: unloaded — c15t removes the script element from the DOM. Plausible is cookieless, so no client-side state needs clearing.

If you need script extensions or hash-based routing support, pass them through the helper:

The helper seeds a window.plausible queue stub during onBeforeLoad, so any calls made between the consent grant and the real script attaching get buffered into plausible.q and replayed. It also maps the legacy data-domain / data-api attributes and the new scriptId-based loader URL automatically.

Tracking events in your app

c15t gates the Plausible script from loading until measurement consent is granted. Your application code that calls Plausible is not automatically gated — window.plausible does not exist until the script is loaded, so unguarded calls before consent throw.

Guard event calls by checking consent state. From React:

From plain JavaScript:

Types

PlausibleAnalyticsOptions

Loading…

Script

Loading…