Is your feature request related to a problem? Please describe.
It's unclear as to where to add the environment variables. According to the README:
Then, set an environment variable
window.STORYBOOK_GA_ID = UA-000000-01 window.STORYBOOK_REACT_GA_OPTIONS = {}
This doesn't specify where they could be added. If I add the following to the beginning of my preview.js file, react-ga throws a warning into console
// In preview.js
window.STORYBOOK_GA_ID = 'UA-0000000-0';
# In console
[react-ga] gaTrackingID is required in initialize()
Describe the solution you'd like
Some clearer documentation around where to add the ENV variables.
Describe alternatives you've considered
I guess if an explanation on this issue is enough then that would work too.
Are you able to assist bring the feature to reality?
Yes, I'd be happy to add the clarification to the README
Also doesn't work in main.js, but it seems to work when added to the top of manager.js, but based on the documentation I don't know if that's the preferred location.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Thanks for the manager.js tip, worked perfectly for me!