Skip to content

feat: support Amazon DSP content URL on bid requests - #16

Open
0xRomain wants to merge 1 commit into
masterfrom
feature/v2-2171-content-url
Open

feat: support Amazon DSP content URL on bid requests#16
0xRomain wants to merge 1 commit into
masterfrom
feature/v2-2171-content-url

Conversation

@0xRomain

@0xRomain 0xRomain commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Contexte

Ticket : V2-2171 — Amazon DSP app.content.url

Amazon 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 Amazon est 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

  • contentUrl optionnel dans AdLoaderOptions, par bid request
  • iOS : transmis à +[APS setContentUrl:], appelé juste avant loadAd et dans le même appel natif
  • Android : ignoré et documenté — le SDK APS Android 11.1.1 n'expose aucun équivalent
  • README : section dédiée + tableau de support par plateforme
  • Version 2.2.1 → 2.3.0

Points 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.
  • Une valeur vide est ignorée et non transmise : le header du SDK indique qu'elle lève une NSException en développement.
  • L'atomicité iOS est une hypothèse à valider sur device (deux loadAd simultanés + capture Charles), pas une propriété garantie.

Vérification

  • yarn test:jest — 36 tests verts (4 nouveaux)
  • yarn tsc:compile
  • yarn lint:js:check
  • Validation device iOS avant publication npm

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant