Skip to content

Commit

Permalink
chore(storybook): added google analytics code TET-592
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-potepa committed Dec 20, 2023
1 parent 5a63216 commit d497d42
Show file tree
Hide file tree
Showing 4 changed files with 426 additions and 12 deletions.
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config: StorybookConfig = {
'@storybook/addon-styling',
'@storybook/addon-docs',
'@storybook/addon-mdx-gfm',
'@storybook/addon-google-analytics',
],
framework: {
name: '@storybook/react-vite',
Expand Down
8 changes: 8 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
declare global {
interface Window {
STORYBOOK_GA_ID: string;
}
}

import { addons } from '@storybook/manager-api';

import lightTheme from './lightTheme';

addons.setConfig({
theme: lightTheme,
});

window.STORYBOOK_GA_ID = 'G-3011WK9KYZ';
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"prepare": "husky install"
},
"dependencies": {
"@storybook/addon-google-analytics": "^6.2.9",
"@virtuslab/tetrisly-icons": "^1.1.1",
"react-is": "^18.2.0",
"rfdc": "^1.3.0"
Expand Down
Loading

0 comments on commit d497d42

Please sign in to comment.