Skip to content

@astroutils/analytics

which analytics provider are you using?

  1. Install the package:

    Terminal window
    pnpm add @astroutils/analytics
  2. Add the <Analytics /> component to your layout file:

    src/layouts/Layout.astro
    ---
    import { Analytics } from "@astroutils/analytics/umami";
    ---
    ...
    <Analytics
    host="the url to the tracker script"
    websiteId="the website id from umami"
    /> {/* add this before the end of your <head> tag */}

don’t see your analytics provider? submit a new one!