From 15e18dbe21a5184b05a4c01c2a1e29fc7415569a Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio@bekerle.com> Date: Mon, 15 Feb 2021 08:16:36 +0100 Subject: [PATCH] Add analytics-event documentation --- README.md | 1 + packages/matomo/README.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index f813be40..b7f92105 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ the version number in its `package.json` is higher than the version number on np | `entry-point-url` | Entry point url for all api requests | | `requested-login-status` | Used by the login buttons to trigger a login in auth components | | `initial-file-handling-state` | Used by the file-handling component to sync file source/sink at first time open | +| `analytics-event` | Used to send analytics events to the Matomo component | ## Reserved events diff --git a/packages/matomo/README.md b/packages/matomo/README.md index f985efe3..476a24d9 100644 --- a/packages/matomo/README.md +++ b/packages/matomo/README.md @@ -23,6 +23,20 @@ npm i @dbp-toolkit/matomo - example auth property: `{'login-status': 'logged-in'}` - note: most often this should be an attribute that is not set directly, but subscribed at a provider +### Emitted attributes + +The component emits a `dbp-set-property` event for the `analytics-event` attribute. +It looks like this: + +```json +{ + "category": "the category of the event", + "action": "the action of the event", + "name": "the name of the event", + "value": "the value of the event" +} +``` + ## Tracking actions ```html -- GitLab