storybook/addons/google-analytics
Michael Shilman 93002b5e79 v5.3.0-beta.1
2019-11-18 22:30:27 +08:00
..
2019-11-18 22:30:27 +08:00

Storybook Addon Google Analytics

Storybook Addon Google Analytics can be used to support google analytics in Storybook.

Framework Support

Getting Started

Install:

yarn add @storybook/addon-google-analytics --dev

Then, add following content to .storybook/addons.js

import '@storybook/addon-google-analytics/register';

Then, set an environment variable

window.STORYBOOK_GA_ID = UA-000000-01
window.STORYBOOK_REACT_GA_OPTIONS = {}