fix two issues related to hb_uuid and hb_cache_id targeting keys #3568
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.
Type of change
Description of change
This PR incorporates some fixes related to the
hb_uuid
andhb_cache_id
targeting keys.Some issues that were fixed:
due to the order in which the code was executed, the
bid.adserverTargeting.hb_uuid
andbid.adserverTargeting.hb_cache_id
fields weren't properly populated with the bid'svideoCacheKey
after it came back from Prebid Cache. This caused other functions that pulled the targeting keys (likepbjs.getAdserverTargetingForAdUnitCode()
) to be missing this information when it was otherwise expected to be there.a consequence to the above issue, when the publisher tried to overwrite the values for these keys in the
pbjs.bidderSettings
feature - the overwrites wouldn't work because thebid.videoCacheKey
wasn't populated at the time thesebidderSettings
values were used.The changes in this PR addresses the above issues through mainly moving the code around to populate the
bid.adserverTargeting
object once we know the bid is complete (ie back from prebid cache for that use-case).Note - removed the
dfpAdServerVideo
code since it's now redundant.