-
Notifications
You must be signed in to change notification settings - Fork 10.4k
fix(analytics): prevent dashboard GTM on booking success page #22643
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
base: main
Are you sure you want to change the base?
fix(analytics): prevent dashboard GTM on booking success page #22643
Conversation
@DarshanKumarA is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe change updates the Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
apps/web/components/GTM.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-playwright". (The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings
apps/web/components/GTM.tsx (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/19/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (07/19/25)1 label was added to this PR based on Keith Williams's automation. |
Hi team, thanks for the opportunity to contribute! It looks like the automated CI checks are failing with a couple of configuration issues. I'm seeing errors related to: A missing eslint-plugin-playwright dependency. A request to update the global npm version to 11.4.2. These seem to be project-level tooling issues. My code changes for the GTM fix are ready for review when you get a chance. Let me know if you need anything else from me! |
This PR is being marked as stale due to inactivity. |
Closes #22617
What does this PR do?
This PR prevents the main dashboard's Google Tag Manager (GTM) container from loading on the booking success page (
/[user]/book/success
).Currently, the incorrect dashboard GTM script loads on this page, which can lead to skewed analytics data. This change isolates the booking success page from the main app's analytics container by adding a path check in the
GoogleTagManagerComponent
. This ensures only the correct booking-flow analytics are active.Visual Demo (For contributors especially)
N/A — This change affects a background analytics script and has no direct visual component. The verification is done by inspecting network requests as described in the testing steps below.
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
This change can be verified by checking for the absence of the GTM script on the booking success page.
Note for Testers: The dashboard GTM script is also configured to only load for users with a US-based geolocation. If you are testing from outside the US, the script will not load on any page. This is expected. The key is to confirm it remains unloaded on the success page.
F12
) to the Network tab.gtm.js
./event-types
.gtm.js
script should appear in the network log. If outside the US, the log will be empty (this is OK).gtm.js
script must not load on this page, regardless of your location. This confirms the fix is working.