1.1.12 • Published 7 days ago

@janus-idp/backstage-plugin-analytics-module-matomo v1.1.12

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
7 days ago

Analytics Module: Matomo Analytics

This plugin provides an opinionated implementation of the Backstage Analytics API for Matomo Analytics. Once installed and configured, analytics events will be sent to Matomo as your users navigate and use your Backstage instance.

This module is made to work with backstage's built-in analytics plugin. The usage guide to start tracking analytics for your plugins can be found here: https://backstage.io/docs/plugins/analytics/

Installation

  1. Install the plugin package in your Backstage app:
# From your Backstage root directory
yarn add --cwd packages/app @janus-idp/backstage-plugin-analytics-module-matomo
  1. Wire up the API implementation to your App:
// packages/app/src/apis.ts
import {
  analyticsApiRef,
  configApiRef,
  identityApiRef,
} from '@backstage/core-plugin-api';

import { MatomoAnalytics } from '@janus-idp/backstage-plugin-analytics-module-matomo';

export const apis: AnyApiFactory[] = [
  // Instantiate and register the Matomo Analytics API Implementation.
  createApiFactory({
    api: analyticsApiRef,
    deps: { configApi: configApiRef },
    factory: ({ configApi }) => MatomoAnalytics.fromConfig(configApi),
  }),
];
  1. Configure the plugin in your app-config.yaml:

The following is the minimum configuration required to start sending analytics events to Matomo. All that's needed is your Matomo Host and Site Id:

# app-config.yaml
app:
  analytics:
    matomo:
      host: ${ANALYTICS_MATOMO_INSTANCE_URL}
      siteId: ${ANALYTICS_MATOMO_SITE_ID}
  1. Update CSP in your app-config.yaml:(optional)

The following is the minimal content security policy required to load scripts from your Matomo Instance.

backend:
  csp:
    connect-src: ["'self'", 'http:', 'https:']
    # Add these two lines below
    script-src: ["'self'", "'unsafe-eval'", '<matomo-instance-url>']
1.1.12

7 days ago

1.1.11

7 days ago

1.1.9

9 days ago

1.1.10

9 days ago

1.1.8

14 days ago

1.1.7

24 days ago

1.1.6

1 month ago

1.1.5

1 month ago

1.1.4

1 month ago

1.1.3

1 month ago

1.1.2

1 month ago

1.1.1

2 months ago

1.1.0

2 months ago

1.0.4

3 months ago

1.0.3

3 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago