-
Notifications
You must be signed in to change notification settings - Fork 2
fix: [TIPPI-796] extensions welt #327
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
Conversation
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.
Pull request overview
This PR enhances the robustness of the Tippi extensions for WELT by adding comprehensive null/undefined checks and improving test coverage. The changes focus on defensive programming practices to prevent runtime errors when global objects like window.utag are not available.
Key changes:
- Added guard clauses checking for
window.utagandwindow.utag.dataexistence across multiple utility functions - Introduced two new extension files:
media_tracking.jsandbraze_checkout_tracking.js - Added comprehensive test suites for both new extensions with over 900 lines of test coverage
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/welt/media_tracking.test.js |
Comprehensive test suite for media tracking interceptor functionality |
tests/welt/braze_checkout_tracking.test.js |
Complete test coverage for Braze checkout success tracking |
extensions/welt/media_tracking.js |
New extension that intercepts utag.link to add event40 for first 'pos' event per media_id |
extensions/welt/braze_checkout_tracking.js |
New extension for tracking checkout success events in Braze |
extensions/doPlugins/doPlugins_global.js |
Added defensive null checks throughout utility functions to prevent runtime errors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return !!(!!s.pageName && (s.pageName.indexOf('42925516') !== -1 | ||
| || s.pageName.indexOf('54578900') !== -1) | ||
| || window.location.toString().indexOf('unangemeldet-42925516') !== -1 | ||
| || window.location.toString().indexOf('unangemeldet-54578900') !== -1 | ||
| || (!!window.utag.data['dom.pathname'] && window.utag.data['dom.pathname'].indexOf('adblockwall.html') !== -1) | ||
| || (!!window.utag.data.page_document_type && window.utag.data.page_document_type.indexOf('adwall') !== -1)); | ||
| || (window.utag && window.utag.data && window.utag.data['dom.pathname'] && window.utag.data['dom.pathname'].indexOf('adblockwall.html') !== -1) | ||
| || (window.utag && window.utag.data && window.utag.data.page_document_type && window.utag.data.page_document_type.indexOf('adwall') !== -1)); |
Copilot
AI
Dec 9, 2025
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 double negation on line 86 (!!) is redundant since the entire expression is already wrapped in !!(). Remove the inner !! before s.pageName to simplify the code without changing its behavior.
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.
@copilot open a new pull request to apply changes based on this feedback
|
@LyubovSugak I've opened a new pull request, #330, to work on those changes. Once the pull request is ready, I'll request review from you. |
https://axelspringer.atlassian.net/browse/TIPPI-796