chore: add hydro analytics to storybook
Closes https://github.com/github/primer/issues/3269
Add support for hydro analytics to storybook in production deployments. This is only used to get page views of different URLs in storybook.
Changelog
New
Changed
- Update storybook config to include hydro tags when deployed to production
Removed
Rollout strategy
- [x] None; if selected, include a brief description as to why
This is a change to our storybook
Testing & Reviewing
- Verify that hydro events are being emitted in preview (temporarily enabled for this PR)
I'll make sure to remove support for page views in previews after we verify that it is wired up correctly 👍
⚠️ No Changeset found
Latest commit: 2cee5c3ab501399e8c804cf8add8bc9966d76ed2
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
size-limit report 📦
| Path | Size |
|---|---|
| packages/react/dist/browser.esm.js | 87.98 KB (0%) |
| packages/react/dist/browser.umd.js | 88.28 KB (0%) |
Verified analytics are being sent for the preview over in: https://github.slack.com/archives/C02NUUQ9C30/p1714755458846759?thread_ts=1714728330.477579&cid=C02NUUQ9C30
Updated it so that we now will only report in production and not previews 👍