Choose your providers
Connect Fathom, Plausible, Google Analytics 4, Matomo, or Umami. Use one provider or several together.
Analytics for Astro · Astro integration
Connect your Astro or Starlight site to the analytics providers you choose. Track pageviews and custom events, and connect tracking to your site’s consent choices.
What you can do
Connect Fathom, Plausible, Google Analytics 4, Matomo, or Umami. Use one provider or several together.
Track pageviews on normal page loads and as visitors navigate with Astro’s ClientRouter.
Use a shared event API across providers, with a result for each provider.
Use runtime consent controls to connect tracking to the choices made through your site’s consent interface.
Get started
npm install --save-exact @codeworkslabs/astro-analytics@0.1.0Follow the documentation to configure your providers, choose how pageviews are tracked, and connect your consent controls.
Read the setup guide →If you use consent gating, your site supplies the consent banner and remembers visitors’ choices. The integration provides runtime controls; it does not include an event queue or retry failed events. A provider accepting an event in the browser does not confirm delivery to its server.