-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: gtm messageId support for track and page #1709
Conversation
WalkthroughThe recent updates focus on enhancing the Google Tag Manager integration within a JavaScript analytics framework. New test cases have been added for various functionalities including event tracking and user identification. Additionally, the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/analytics-js-integrations/tests/integrations/GoogleTagManager/browser.test.js (1 hunks)
- packages/analytics-js-integrations/src/integrations/GoogleTagManager/browser.js (2 hunks)
Additional comments not posted (5)
packages/analytics-js-integrations/src/integrations/GoogleTagManager/browser.js (2)
61-61
: The addition ofmessageId
to thetrack
method supports event deduplication effectively.
91-91
: The inclusion ofmessageId
in thepage
method is correctly implemented to support event deduplication.packages/analytics-js-integrations/__tests__/integrations/GoogleTagManager/browser.test.js (3)
44-48
: The test for theinit
method correctly verifies thatloadNativeSdk
is called with the appropriate parameters.
88-114
: The test for thetrack
method adequately checks that the correct properties, includingmessageId
, are sent to the dataLayer.
117-165
: The tests for thepage
method are comprehensive and correctly verify that the correct properties, includingmessageId
, are sent to the dataLayer for different scenarios.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1709 +/- ##
===========================================
+ Coverage 54.27% 54.41% +0.14%
===========================================
Files 462 462
Lines 15655 15655
Branches 3096 3107 +11
===========================================
+ Hits 8497 8519 +22
+ Misses 5877 5845 -32
- Partials 1281 1291 +10 ☔ View full report in Codecov by Sentry. |
size-limit report 📦
|
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.
The integration changes LGTM. However, I did not review the test suite.
|
PR Description
user ask : to support messageId in track and page call in order to deduplicate events.
ref : https://developers.google.com/tag-platform/tag-manager/datalayer#one_push_multiple_variables
Linear task (optional)
Resolves INT-2092
Cross Browser Tests
Please confirm you have tested for the following browsers:
Sanity Suite
Security
Summary by CodeRabbit
messageId
in event properties, improving tracking precision.