Skip to content
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

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Mar 13, 2024

Fix the data collection about the inline ads. Needed to collect statistics on to move on #39285

image

Current statistics can be seen here:

https://analytics.google.com/analytics/web/#/analysis/p353089763/edit/9w1vckV7T1umgP5PSvL3vw

The display and click action have both been tested with the Google tag assistant. They are correctly recognized 👍

@alexfauquette alexfauquette added the scope: docs-infra Specific to the docs-infra product label Mar 13, 2024
@mui-bot
Copy link

mui-bot commented Mar 13, 2024

Netlify deploy preview

https://deploy-preview-41474--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against ddff14b

@alexfauquette alexfauquette changed the title [docs] Get analytics about inline ads [docs] Fix analytics about inline ads Mar 13, 2024
@alexfauquette alexfauquette requested a review from a team March 13, 2024 10:55
@danilo-leal danilo-leal changed the title [docs] Fix analytics about inline ads [docs-infra] Fix analytics about inline ads Mar 13, 2024
Comment on lines 28 to 30
if (Math.random() < 0.9 || !ad.label) {
return;
}
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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

@alexfauquette alexfauquette requested review from siriwatknp and a team March 26, 2024 08:36
Copy link
Member

@siriwatknp siriwatknp left a 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!

@alexfauquette alexfauquette merged commit b3e95eb into mui:master Apr 5, 2024
19 checks passed
@alexfauquette alexfauquette deleted the ad-analytics branch April 5, 2024 09:22
alexfauquette added a commit to alexfauquette/material-ui that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants