Skip to content

Add locale variants to paid-media-creative datatype#2174

Open
ejsuncy wants to merge 1 commit into
adobe:masterfrom
ejsuncy:feature-2173-paid-media-creative-locale-variants
Open

Add locale variants to paid-media-creative datatype#2174
ejsuncy wants to merge 1 commit into
adobe:masterfrom
ejsuncy:feature-2173-paid-media-creative-locale-variants

Conversation

@ejsuncy
Copy link
Copy Markdown
Contributor

@ejsuncy ejsuncy commented May 15, 2026

What this PR does

Adds an xdm:localeVariants array to the paid-media-creative datatype so a single creative can carry per-locale overrides for title, body, callToAction, destinationURL, displayURL, trackingURLs, and assets. Each variant is keyed by an xdm:language BCP 47 tag.

This models how ad networks deliver one creative with multiple language versions:

Real-world evidence (parent ticket): we observed the same Meta ad creative ID carrying different asset IDs, images, body text, and headlines per locale. The current schema can only model one of them.

Design

  • Top-level creative fields are unchanged in shape and remain the default/fallback value for locales not matched by any variant — consistent with Meta's behavior where assets without language_label are free-form defaults.
  • creativeAsset and creativeTrackingURL are extracted into reusable sub-definitions referenced from both the top-level fields and each locale variant, per CONTRIBUTING.md – Re-Use and Modularity.
  • xdm:language reuses the BCP 47 regex already in use in profile-preferences-details and content-component-details.

Breaking changes

None. New optional field on an experimental datatype.

Validation

  • npm run validate components/datatypes/paid-media — 14 / 14 examples passing
  • npm test — 2388 mocha tests passing
  • npm run lint (prettier) — clean

Related

…age creative content

Adds xdm:localeVariants to the paid-media-creative datatype so a single
creative can carry per-locale overrides for title, body, callToAction,
destinationURL, displayURL, trackingURLs, and assets. Each variant is
keyed by an xdm:language BCP 47 tag.

Models Meta Marketing API multi-language ads (asset_feed_spec language_label
customization) and supports equivalent ad-network localization concepts
such as Google Ads ad customizers. Top-level creative fields remain as
the default/fallback for locales not present in the variant list.

Extracts creativeAsset and creativeTrackingURL into reusable sub-definitions
to keep the top-level fields and locale variants in sync without duplication
(CONTRIBUTING.md Re-Use and Modularity).

Adds paid-media-creative.example.4.json demonstrating English, Arabic,
and French variants of a single image creative.

Refs adobe#2173, AN-450480, AN-451211
@ejsuncy ejsuncy marked this pull request as ready for review May 15, 2026 23:05
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