Repository navigation
✨ Add amp-ad implementation for gsrv - #40564
Merged
Merged
Conversation
Ad zones served by an ad network that runs on GoAdserver. The vendor script loads the network's ad controller from data-host and hands it the zone; the controller renders it into the frame and calls renderStart() with the ad's size, noContentAvailable() on no fill, and reportRenderedEntityIdentifier().
erwinmombay
approved these changes
Oct 19, 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.
Adds
gsrvas a third-party ad vendor: ad zones served by ad networks that run on GoAdserver.How it works
ads/vendors/gsrv.jsvalidates the attributes and loads the network's ad controller fromhttps://<data-host>/ctrl/<data-ctrl>.jsinto the 3p frame.data-hostis the network's own serving domain, validated as a plain host name (each network on the platform serves from its own domain, the same model as theasointegration).#cand reports to AMP itself:renderStart({width, height})once the ad has rendered (images loaded), with the creative's height; the width stays the slot's.noContentAvailable()when the zone has no ad, or the controller cannot be loaded.reportRenderedEntityIdentifier()with the zone id (no user data).ads/vendors/gsrv.md.Changes included
3p/vendors/gsrv.js: vendor bootstrap.ads/vendors/gsrv.js: main logic.ads/vendors/gsrv.md: publisher documentation.ads/_config.js:renderStartImplemented: true. There is no prefetch/preconnect entry because the host differs per network.extensions/amp-ad/amp-ad.md: link to the documentation.examples/amp-ad/ads.amp.html+ads.amp.esm.html: an example on a demo zone that always fills.test/unit/ads/test-gsrv.js: unit tests.Testing
amp lint,amp prettify,amp check-typesall pass.amp unit --files=test/unit/{test-ads-config.js,test-integration.js},test/unit/ads/test-gsrv.jspasses.Live demo of ads on AMP pages: https://www.goadserver.com/demo/amp/
Contact: support@goadserver.com
cc @ampproject/wg-monetization