Use Meta default event names for analytics - #91338
Conversation
Change Meta's WorkspaceCreated to Lead and PaidAdoption to Purchase to use Meta's preferred default event names instead of custom ones. Co-authored-by: Youssef Lourayad <youssef-lr@users.noreply.github.com>
|
@mjasikowski Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3109ebd5f4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| WORKSPACE_CREATED: { | ||
| NAME: 'workspace_created', | ||
| META: 'WorkspaceCreated', | ||
| META: 'Lead', |
There was a problem hiding this comment.
Use Meta standard-event dispatch for default event names
Changing META to Lead/Purchase does not actually send Meta standard events in the current implementation, because publishEvent() always calls fbq('trackCustom', pixelEvent.META, ...) in src/libs/GoogleTagManager/index.ts. With this commit, workspace_created and paid_adoption are still emitted as custom events named Lead/Purchase, so the intended migration to Meta default event types (for reporting/optimization compatibility) is not achieved.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in db0a475. Added a META_IS_STANDARD flag to each pixel event config — Lead and Purchase now dispatch via fbq('track', ...) (standard events), while SignUp stays on fbq('trackCustom', ...).
|
The failing checks are not related to the PR code changes — all code checks (ESLint, Prettier, typecheck, tests, builds) are passing. Failing checks:
No code fix is needed. |
Add META_IS_STANDARD flag to distinguish standard vs custom Meta events.
WORKSPACE_CREATED (Lead) and PAID_ADOPTION (Purchase) now dispatch via
fbq('track') so Meta recognizes them as default event types, while
SIGN_UP remains a custom event via fbq('trackCustom').
Co-authored-by: Youssef Lourayad <youssef-lr@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@youssef-lr is this one ready to go or are you still working on it? |
|
Should be ready now, thank you! |
|
Oh forgot to ask, should this be |
|
🚧 @amyevans has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/amyevans in version: 9.3.79-1 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR. It updates internal Meta analytics event names ( No help site changes are required. These are purely internal analytics/tracking changes with no impact on user-facing features, UI, or documentation. |
|
@youssef-lr could you please provide the QA steps to execute? |
|
No QA needed |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.79-4 🚀
|
Explanation of Change
Meta prefers default event names over custom ones. This changes the Meta analytics event names:
WorkspaceCreated→Lead(for workspace creation events)PaidAdoption→Purchase(for paid adoption events)This aligns Meta's event naming with their standard/default event types, which improves compatibility with Meta's ads platform (e.g., custom events don't appear in Meta's UI until they've received at least one event).
Fixed Issues
https://expensify.slack.com/archives/C03SSAQG5/p1779385468625819?thread_ts=1778597857.645129&cid=C03SSAQG5
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A — this is a constant value change only.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
Author checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
AI Tests
Note: Local AI tests could not run due to Node version mismatch (environment has Node 22, repo requires Node 20.20.0). The change is a trivial two-line string constant update with no logic changes.
Co-authored-by: youssef-lr youssef-lr@users.noreply.github.com