Add locale variants to paid-media-creative datatype#2174
Open
ejsuncy wants to merge 1 commit into
Open
Conversation
…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
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.
What this PR does
Adds an
xdm:localeVariantsarray to thepaid-media-creativedatatype so a single creative can carry per-locale overrides fortitle,body,callToAction,destinationURL,displayURL,trackingURLs, andassets. Each variant is keyed by anxdm:languageBCP 47 tag.This models how ad networks deliver one creative with multiple language versions:
asset_feed_speclanguage_labelcustomization, where the same ad creative carries multiple body/title/image assets each tagged with a language.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
language_labelare free-form defaults.creativeAssetandcreativeTrackingURLare extracted into reusable sub-definitions referenced from both the top-level fields and each locale variant, per CONTRIBUTING.md – Re-Use and Modularity.xdm:languagereuses the BCP 47 regex already in use inprofile-preferences-detailsandcontent-component-details.Breaking changes
None. New optional field on an
experimentaldatatype.Validation
npm run validate components/datatypes/paid-media— 14 / 14 examples passingnpm test— 2388 mocha tests passingnpm run lint(prettier) — cleanRelated