@yeskunall/astro-umami
v0.0.2
Published
Add Umami Analytics to your Astro website
Downloads
250
Maintainers
Readme
@yeskunall/astro-umami
An Astro integration to add Umami Analytics to your website.
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 (support for Astro 5 since
v0.0.2
)
Usage
Install
Astro includes an astro add
command to automate the setup of official integrations. Enable Umami analytics in your Astro project with the following:
pnpm astro add @yeskunall/astro-umami
This will install @yeskunall/astro-umami
and make the appropriate changes to your astro.config.mjs
file in one step.
Manual install
- Install the required dependencies
pnpm add @yeskunall/astro-umami
- Add the integration to your Astro config:
+ import umami from "@yeskunall/astro-umami";
export default defineConfig({
integrations: [
+ umami({ id: "94db1cb1-74f4-4a40-ad6c-962362670409" }),
],
});