1.3.6 • Published 19 hours ago

@janus-idp/backstage-plugin-analytics-provider-segment v1.3.6

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
19 hours ago

Analytics Module: Segment

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

This plugin contains no other functionality.

Installation

  1. Install the plugin package in your Backstage app:

    yarn workspace app add @janus-idp/backstage-plugin-analytics-provider-segment

Configuration

  1. Wire up the API implementation to your App in packages/app/src/apis.ts:

    /* highlight-add-start */
    import {
      analyticsApiRef,
      configApiRef,
      identityApiRef,
    } from '@backstage/core-plugin-api';
    
    import { SegmentAnalytics } from '@janus-idp/backstage-plugin-analytics-provider-segment';
    
    /* highlight-add-end */
    
    export const apis: AnyApiFactory[] = [
      // Other APIs...
      // Instantiate and register the GA Analytics API Implementation.
      /* highlight-add-start */
      createApiFactory({
        api: analyticsApiRef,
        deps: { configApi: configApiRef, identityApi: identityApiRef },
        factory: ({ configApi, identityApi }) =>
          SegmentAnalytics.fromConfig(configApi, identityApi),
      }),
      /* highlight-add-end */
    ];
  2. Configure the plugin in your app-config.yaml:

The following is the minimum configuration required to start sending analytics events to Segment. All that's needed is your Segment Write Key

app:
  analytics:
    segment:
      # highlight-start
      writeKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      maskIP: true # prevents IP addresses from being sent if true
      # highlight-end

Debugging and Testing

In pre-production environments, you may wish to set additional configurations to turn off reporting to Analytics. You can do so like this:

app:
  analytics:
    segment:
      # highlight-next-line
      testMode: true # prevents data from being sent if true

You might commonly set the above in an app-config.local.yaml file, which is normally gitignore'd but loaded and merged in when Backstage is bootstrapped.

1.3.6

19 hours ago

1.3.5

8 days ago

1.3.4

8 days ago

1.3.3

10 days ago

1.3.2

10 days ago

1.3.1

15 days ago

1.3.0

25 days ago

1.2.16

1 month ago

1.2.15

1 month ago

1.2.14

1 month ago

1.2.13

1 month ago

1.2.12

1 month ago

1.2.11

2 months ago

1.2.10

2 months ago

1.2.9

2 months ago

1.2.8

3 months ago

1.2.7

3 months ago

1.2.6

3 months ago

1.2.5

4 months ago

1.2.4

4 months ago

1.2.3

5 months ago

1.2.0

6 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.7

10 months ago

1.1.4

6 months ago

1.2.2

5 months ago

1.1.3

7 months ago

1.2.1

6 months ago

1.1.2

8 months ago

1.0.6

11 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago