feat: support Amazon DSP content URL on bid requests - #16
Open
0xRomain wants to merge 1 commit into
Open
Conversation
Amazon DSP now requires in-app bid requests to carry the public web URL of the content being viewed, so AmazonAdBot can crawl the page and verify what surrounds the ad. Inventory it cannot verify progressively loses eligibility with Amazon advertisers. Adds an optional `contentUrl` to AdLoaderOptions, applied per bid request. iOS: forwarded to +[APS setContentUrl:], called immediately before loadAd and inside the same native method. That setter is a class method, so the value is process-global; setting it there means another slot cannot overwrite it between the two, since React Native serialises module methods on a single queue. An empty value is skipped rather than forwarded — the SDK header states it throws an NSException in development builds otherwise. Android: ignored, and documented as such. The Android APS SDK (com.amazon.android:aps-sdk 11.1.1) exposes no equivalent of setContentUrl — verified against every public member of AdRegistration and DTBAdRequest. Rejecting the promise would break the bidding chain for callers that legitimately pass the option for iOS, so the option is accepted and dropped. Two known limitations are documented in the README and have been raised with Amazon APS: the Android gap above, and the fact that the iOS setter is sticky — it cannot be cleared, so the last URL set stays attached to later requests until another one replaces it. Validation rejects a non-string contentUrl, consistent with the other options. 36 tests green.
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.
Contexte
Ticket : V2-2171 — Amazon DSP
app.content.urlAmazon DSP exige que chaque bid request in-app porte l'URL web publique du contenu consulté, pour qu'AmazonAdBot puisse crawler la page. Vérifié en production sur Foot Mercato : le bidder
Amazonest tombé à 0 € sur le TAM in-app le 31/07/2026, simultanément sur les 3 sites, alors que les 13 autres bidders TAM continuaient de délivrer.Modifications
contentUrloptionnel dansAdLoaderOptions, par bid request+[APS setContentUrl:], appelé juste avantloadAdet dans le même appel natifPoints d'attention
+[APS setContentUrl:]est une méthode de classe, donc un état process-global et sticky : impossible à effacer, la dernière URL posée reste attachée aux requêtes suivantes. Remonté à Amazon APS.NSExceptionen développement.loadAdsimultanés + capture Charles), pas une propriété garantie.Vérification
yarn test:jest— 36 tests verts (4 nouveaux)yarn tsc:compileyarn lint:js:check