@yeskunall/astro-umami

0.0.4 • Public • Published

astro-umami

An Astro integration to add Umami Analytics to your website.

main license npm version

🪶 Highlights

  • Automatically detects if you’re using View Transitions and adds a data-astro-rerun attribute
  • Disables events and pageviews during development
  • Prevents Google Tag Manager from stripping custom data-* attributes
  • Supports all configuration options, unlike astro-analytics
  • (Optionally) Serve the tracking script using Partytown (planned in an upcoming release)
  • Actively maintained

🍛 Usage

Install

Run the following from your project directory and follow the prompts:

pnpm astro add @yeskunall/astro-umami@0.0.4

This will install and make the appropriate changes to your Astro config automatically.

Manual install

  1. Install the required dependencies
pnpm add @yeskunall/astro-umami@0.0.4
  1. Add the integration to your Astro config:
+ import umami from "@yeskunall/astro-umami";

export default defineConfig({
  integrations: [
+    umami({ id: "94db1cb1-74f4-4a40-ad6c-962362670409" }),
  ],
});
📖 For all configurable options, see the interface.

⚖️ License

MIT © Kunall Banerjee

Package Sidebar

Install

npm i @yeskunall/astro-umami

Weekly Downloads

346

Version

0.0.4

License

MIT

Unpacked Size

7.76 kB

Total Files

5

Last publish

Collaborators

  • yeskunall