refactor the extension and adjust the test unit#361
Merged
SapirShamai merged 4 commits intomasterfrom Feb 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds logic to distinguish between live video streams and regular VOD content by setting a media_type property based on the presence of "personalstream" in the contentID. This enables proper tracking of 24/7 live streams versus on-demand videos in Adobe Analytics prop37.
Changes:
- Added
media_typeclassification logic that sets"video : 24/7 live"for personalstream URLs and"video"for all other content - Changed
contentIDsource to prioritizeb.contentIDoverutag.data.contentID - Added comprehensive test coverage for the new media type classification feature
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| extensions/lib_books/set_mediaID_from_contentID | Implements media_type classification logic for live vs VOD videos |
| tests/lib_books/set_mediaID_from_contentID.test.js | Adds 4 new test cases covering live stream detection and edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
LyubovSugak
requested changes
Feb 2, 2026
Collaborator
LyubovSugak
left a comment
There was a problem hiding this comment.
we use yarn, please remove package-lock file.
LyubovSugak
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
media_typeon video link events:personalstreamincontentID→video : 24/7 livevideo(keeps legacy behavior)media_idextraction unchanged.Why
Prop37 is “Media Type” in Adobe; hard-coded
videoprevented live vs VOD distinction. Tealium should map prop37 from UDOmedia_type.Tests
npx jest ./tests/lib_books/set_mediaID_from_contentID.test.js(28 passing)