-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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-infra] Fix analytics about inline ads #41474
Conversation
Netlify deploy previewhttps://deploy-preview-41474--material-ui.netlify.app/ Bundle size report |
if (Math.random() < 0.9 || !ad.label) { | ||
return; | ||
} |
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.
Can you explain more what's this for?
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.
Not sure about which aspect is unclear.
The early return is just a way to send only 10% of the ads display event to Goggle Analitics. A similar approach is used for top page ads
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 added a commit to make sure this ratio is consistent between all ads
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.
Thanks for the explanation!
Fix the data collection about the inline ads. Needed to collect statistics on to move on #39285
Current statistics can be seen here:
https://analytics.google.com/analytics/web/#/analysis/p353089763/edit/9w1vckV7T1umgP5PSvL3vw
The
display
andclick
action have both been tested with the Google tag assistant. They are correctly recognized 👍