fix: report hdr source option in internal analytics#1053
Merged
Conversation
The hdr field used hasConfig() (lodash isEmpty) which always returns null for booleans, so it was filtered out and never sent. Report the boolean directly instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for cld-video-player ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for cld-vp-esm-pages ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for cld-vp-esm-pages ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
adimiz1
approved these changes
Jun 4, 2026
Same hasConfig() (lodash isEmpty) bug as hdr: both are booleans that always collapsed to null and were filtered out, so they were never sent. Report the boolean directly instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
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
The
hdrsource option was intended to be reported to internal analytics but never actually was, due to a type bug. This fixes the reporting so the HDR setting is correctly captured.Changes
get-analytics-player-options.js, reporthdras a plain boolean instead of running it throughhasConfig().hasConfig()uses lodashisEmpty(), which returnstruefor any boolean, sohdralways collapsed tonulland was then stripped out byfilterDefaultsAndNulls. As a resulthdrwas never present in the analytics payload, regardless of the configured value.How to Test
hdr: trueand trigger a source change./video_player_sourceon the internal analytics endpoint and confirm the query string now includeshdr=true.hdr(orhdr: false) and confirmhdris omitted from the payload.🤖 Generated with Claude Code