Skip to content

refactor the extension and adjust the test unit#361

Merged
SapirShamai merged 4 commits intomasterfrom
Tippi-1349_set_media_type_for_books
Feb 3, 2026
Merged

refactor the extension and adjust the test unit#361
SapirShamai merged 4 commits intomasterfrom
Tippi-1349_set_media_type_for_books

Conversation

@SapirShamai
Copy link
Contributor

Summary

  • Set media_type on video link events:
    • personalstream in contentIDvideo : 24/7 live
    • else → video (keeps legacy behavior)
  • media_id extraction unchanged.

Why

Prop37 is “Media Type” in Adobe; hard-coded video prevented live vs VOD distinction. Tealium should map prop37 from UDO media_type.

Tests

npx jest ./tests/lib_books/set_mediaID_from_contentID.test.js (28 passing)

Copy link
Contributor

Copilot AI left a 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 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_type classification logic that sets "video : 24/7 live" for personalstream URLs and "video" for all other content
  • Changed contentID source to prioritize b.contentID over utag.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.

Copy link
Collaborator

@LyubovSugak LyubovSugak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use yarn, please remove package-lock file.

@LyubovSugak LyubovSugak self-requested a review February 3, 2026 09:40
@SapirShamai SapirShamai merged commit 50e0a4e into master Feb 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants