Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amplitude/storybook-addon-amplitude

Package Overview
Dependencies
Maintainers
19
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/storybook-addon-amplitude

A storybook addon to capture events in Amplitude

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.4K
decreased by-27.01%
Maintainers
19
Weekly downloads
 
Created
Source

storybook-addon-amplitude

A storybook addon to capture events in Amplitude.

What does it do?

When configured correctly, this storybook addon will send events to your Amplitude instance in two cases:

  1. If a user navigates from one story to another
  2. If a user modifies story args

Usage Guidelines

Install:

yarn add @amplitude/storybook-addon-amplitude --dev

in storybook/main.js

module.exports: {
  addons: [
    'storybook-addon-amplitude/preset',
  ]
}

Then, set your Amplitude API keys in ./storybook/manager.js

window.AMPLITUDE_DEV_API_KEY = '<amplitude-dev-api-key>';
window.AMPLITUDE_PROD_API_KEY = '<amplitude-prod-api-key>';

Event Taxonomy

This storybook addon emits events to Amplitude on two different occasions, when a user switches to a new page and when a user changes a story's args.

When a user switches to a new page, this addon emits an event that looks like this:

{
  event_type: "viewed documentation", 
  event_properties: {
    category: 'variants', 
    page: "secondarybuttongroup"
  }
}

Tracking this event in this way allows you to build charts in Amplitude to show:

a) How many people have viewed your Storybook instance over time b) What category of pages people are viewing most frequently c) What pages people are viewing most frequently

When a user changes a story's args, this addon emits an event that looks like this:

{
  event_type: "updated story args", 
  event_properties: {
    category: 'variants', 
    page: "secondarybuttongroup"
  }
}

a) How often people use the story args functionality b) In which category of pages people update the story args most frequently c) On which pages people update the story args most frequently

Keywords

FAQs

Package last updated on 18 May 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc