1.0.5 • Published 2 months ago

directus-extension-umami v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Header

Umami Directus Extension

This project is a directus extension for integrating Umami analytics. It's configurable using environment variables.

Installation

There are two options to install this extension:

  1. Using the extension marketplace inside Directus
  2. Using npm (run npm install directus-extension-umami inside your directus installation)

Configuration

To configure the extension, you need to set the following environment variables:

  • UMAMI_SRC: The source of your umami analytics script (example: https://umami.yourdomain.com/script.js)
  • UMAMI_WEBSITE_ID: The ID of your website
  • CONTENT_SECURITY_POLICY_DIRECTIVES__SCRIPT_SRC: This is needed to allow loading your umami script. It's value should be: 'self' 'unsafe-eval' 'https://umami.yourdomain.com'

The following variables are optional:

  • UMAMI_HOST_URL: The source of your umami analytics script (example: https://umami.yourdomain.com)
  • UMAMI_AUTO_TRACK: The source of your umami analytics script (example: false)
  • UMAMI_CACHE: If the umami script should cache events (example: true)
  • UMAMI_DOMAINS: The domains the script should send events about (example: www.yourdomain.com,yourdomain.com)
  • UMAMI_DEBUG: If the extension should log debug messages (example: true)

For more info you can check the umami docs

You can find an example environment file at .env.example.

Usage

When configured correctly you should be able to see events pop up in your umami installation.

Development

  1. Clone the repository: git clone https://github.com/egidiusmengelberg/directus-extension-umami.git && cd directus-extension-umami
  2. Install dependencies: npm install
  3. Copy .env.example file to .env: cp .env.example .env
  4. Configure environment variables in .env (check configuration for detailed explanation)
  5. Run directus in docker: docker compose up
  6. Run npm run dev to watch and build the extension

Contributing

Contributions are welcome! Please create a PR and use the provided linting script inside the package.json (npm run lint)

License

This project is licensed under the MIT License.

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

0.0.40

2 months ago

1.0.1

2 months ago

0.0.41

2 months ago

0.0.42

2 months ago

0.0.43

2 months ago

0.0.44

2 months ago

0.0.45

2 months ago

0.0.37

2 months ago

0.0.38

2 months ago

0.0.39

2 months ago

0.0.30

2 months ago

0.0.31

2 months ago

0.0.32

2 months ago

0.0.33

2 months ago

0.0.34

2 months ago

0.0.35

2 months ago

0.0.36

2 months ago

0.0.26

2 months ago

0.0.27

2 months ago

0.0.28

2 months ago

0.0.29

2 months ago

0.0.20

2 months ago

0.0.21

2 months ago

0.0.22

2 months ago

0.0.23

2 months ago

0.0.24

2 months ago

0.0.25

2 months ago

0.0.15

2 months ago

0.0.16

2 months ago

0.0.17

2 months ago

0.0.18

2 months ago

0.0.19

2 months ago

0.0.10

2 months ago

0.0.11

2 months ago

0.0.12

2 months ago

0.0.13

2 months ago

0.0.14

2 months ago

0.0.3

2 months ago

0.0.9

2 months ago

0.0.8

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.7

2 months ago

0.0.6

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago