Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jop-software/astro-matomo
GDPR friendly tracking in astro
https://github.com/jop-software/astro-matomo
analytics astro astro-integration hacktoberfest javascript matomo tracking
Last synced: 3 months ago
JSON representation
GDPR friendly tracking in astro
- Host: GitHub
- URL: https://github.com/jop-software/astro-matomo
- Owner: jop-software
- License: gpl-3.0
- Created: 2022-09-30T16:44:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T20:07:13.000Z (11 months ago)
- Last Synced: 2024-10-13T14:57:16.409Z (4 months ago)
- Topics: analytics, astro, astro-integration, hacktoberfest, javascript, matomo, tracking
- Language: JavaScript
- Homepage:
- Size: 46.9 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Matomo + Astro Integration
> GDRP friendly tracking in your astro app / site 🚀
## Installation
### Installation using the Astro CLI
Using the Astro CLI is the [recommended way](https://docs.astro.build/en/guides/integrations-guide/#automatic-integration-setup) to setup integrations in Astro.
```console
# npm
npx astro add @jop-software/astro-matomo# pnpm
pnpm dlx astro add @jop-software/astro-matomo
```### Manual Installation
When the automatic setup from Astro is not an option for you, feel free to install the package manually.
```console
# npm
npm install @jop-software/astro-matomo# pnpm
pnpm add @jop-software/astro-matomo
```
## Usage```js
// astro.config.mjsimport matomo from '@jop-software/astro-matomo';
export default defineConfig({
// We only track site views when this matches the host the user is on.
// If the configuration is empty, every page view gets tracked.
site: "https://example.com",
integrations: [
matomo({
baseUrl: "https://analytics.example.com/",
siteId: 1
}),
]
});
```© 2022-2024, jop-software Inh. Johannes Przymusinski