♻️ Opinary Ads: fix whitespace issue for AMS integration #34650
Merged
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.
Opinary AMP integration only supported the "automatic matching", where the Opinary algorithm decided what polls to show - sometimes it decided to do not to show any poll
Regarding information in the documentation:
If no ad is available for the slot, AMP attempts to collapse the amp-ad element (that is, set to display: none). AMP determines that this operation can be performed without affecting the user's scroll position. If the ad is in the current viewport, the ad will not be collapsed because it affects the user's scroll position; however, if the ad is outside of the current viewport, it will be collapsed.
Sometimes it keeps reserved space even any poll is displayed and is it problematic for publishers, in that case, we decided to reverse logic and we could reserve 1px height and in a case, we have a poll, try to expand it to 500x500 - in that case the risk for the client is much lower.
CC @torbenbrodt