What is @storybook/telemetry?
@storybook/telemetry is a package used to collect anonymous usage data from Storybook instances. This data helps the Storybook team understand how the tool is being used and improve it accordingly.
What are @storybook/telemetry's main functionalities?
Telemetry Initialization
Initializes the telemetry system for a Storybook project, allowing it to start collecting usage data.
const telemetry = require('@storybook/telemetry');
telemetry.init({
project: 'my-storybook-project',
version: '1.0.0'
});
Sending Custom Events
Sends a custom event to the telemetry system, which can be used to track specific actions or occurrences within the Storybook instance.
telemetry.sendEvent({
eventType: 'custom-event',
payload: {
key: 'value'
}
});
Disabling Telemetry
Disables the telemetry system, stopping any further data collection from the Storybook instance.
telemetry.disable();
Other packages similar to @storybook/telemetry
analytics-node
Analytics-node is a package for sending data to Segment, a customer data platform. It allows you to track events and user actions, similar to @storybook/telemetry, but is more general-purpose and not specific to Storybook.
amplitude-js
Amplitude-js is a JavaScript SDK for Amplitude, a product analytics service. It provides similar functionality to @storybook/telemetry in terms of tracking user interactions and events, but is designed for broader application analytics.
mixpanel
Mixpanel is an analytics platform that helps you understand how users interact with your application. The Mixpanel JavaScript library allows you to track events and user actions, similar to @storybook/telemetry, but is more focused on product analytics.