-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Add Google Analytics action for the styling menu #38085
[docs] Add Google Analytics action for the styling menu #38085
Conversation
Netlify deploy previewhttps://deploy-preview-38085--material-ui.netlify.app/ Bundle size report |
Since the switch is global, I think that it would be great to also track this as a User-scoped custom dimensions https://support.google.com/analytics/answer/10075209?hl=en. Knowing how often developers switch is interesting, but more importantly, we want to know how many demos in which style engine are used. Effectively, reproducing the TS/JS tracking. |
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
e95b093
to
2015425
Compare
Rebased on HEAD. |
@mnajdova In your screenshot, the event label is empty, this is broken: I pushed a fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a report to help accessing the data
@@ -673,6 +673,9 @@ export default function DemoToolbar(props) { | |||
> | |||
<MenuItem | |||
value={CODE_STYLING.SYSTEM} | |||
data-ga-event-category="demo" | |||
data-ga-event-action="styling-system" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update
const CODE_STYLING = {
SYSTEM: 'MUI System',
TAILWIND: 'Tailwind',
CSS: 'CSS',
};
to match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to follow how the other actions look like - they are all kebab-case.
Adding Google event action for the styling menu options.
https://deploy-preview-38085--material-ui.netlify.app/base-ui/react-button/#basics