Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@janus-idp/backstage-plugin-analytics-provider-segment
Advanced tools
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 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.
Install the plugin package in your Backstage app:
yarn workspace app add @janus-idp/backstage-plugin-analytics-provider-segment
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 */
];
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
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.
If you would like to contribute improvements to this plugin, the easiest way to make and test changes is to do the following:
git clone git@github.com:janus-idp/backstage-plugins.git
yarn install
app-config.local.yaml
file in the root of
the monorepo and add config for this plugin (see below)cd plugins/analytics-provider-segment
yarn start
http://localhost:3000/segment
Code for the isolated version of the plugin can be found inside the ./dev
directory. Changes to the plugin are hot-reloaded.
FAQs
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.
The npm package @janus-idp/backstage-plugin-analytics-provider-segment receives a total of 17 weekly downloads. As such, @janus-idp/backstage-plugin-analytics-provider-segment popularity was classified as not popular.
We found that @janus-idp/backstage-plugin-analytics-provider-segment demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.