Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Latest commit

 

History

History
 
 

google-analytics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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

within .storybook/main.js:

module.exports = {
  addons: ['@storybook/addon-google-analytics/register']
}

Then, set an environment variable

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