Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thevrus/astro-umami-analytics
Easily integrate Umami analytics into your Astro projects with this simple, lightweight component.
https://github.com/thevrus/astro-umami-analytics
analytics astro astrojs umami umami-analytics
Last synced: 2 days ago
JSON representation
Easily integrate Umami analytics into your Astro projects with this simple, lightweight component.
- Host: GitHub
- URL: https://github.com/thevrus/astro-umami-analytics
- Owner: thevrus
- Created: 2024-10-06T18:49:42.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-06T19:05:02.000Z (4 months ago)
- Last Synced: 2025-01-11T16:41:32.037Z (about 1 month ago)
- Topics: analytics, astro, astrojs, umami, umami-analytics
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# astro-umami-analytics
An Astro component for easy integration of Umami analytics into your Astro projects.
## Installation
To install astro-umami-analytics, run the following command in your project directory:
```bash
npm install astro-umami-analytics
```## Usage
To use the Umami component in your Astro project, follow these steps:
1. Import the Umami component in your Astro layout or page:
```astro
---
import { Umami } from "astro-umami-analytics";
---
```2. Add the Umami component to your `` section, providing your Umami website ID:
```astro
```
Here's a complete example of how to use the Umami component in an Astro layout:
```astro
---
import { ViewTransitions } from "astro:transitions";
import { Umami } from "astro-umami-analytics";interface Props {
title: string;
description: string;
}const { title, description } = Astro.props;
---
{title}
```
Make sure to replace `"your-umami-website-id"` with your actual Umami website ID.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License.
## Author
- Vadym Rusin