Generalize paid-media-creative variants for Google Ads customizers (soft-deprecate localeVariants)#2179
Open
ejsuncy wants to merge 1 commit into
Open
Conversation
…ditions, soft-deprecate localeVariants Replaces the narrow xdm:localeVariants field with a more general xdm:variants array on the paid-media-creative datatype. Each variant enumerates one materially different rendered version of the creative, driven by language localization (Meta asset_feed_spec language_label), template/customizer substitution (Google Ads CustomizerAttribute), or both. New sub-definitions: - creativeCustomizer: resolved (name, type, value, scope) tuple. Scope enum covers customer / account / campaign / adGroup / adGroupCriterion / asset / other to span Google Ads hierarchy and other networks. - creativeVariant: optional xdm:variantID + xdm:language + xdm:customizers + per-variant overrides of title, body, callToAction, destinationURL, displayURL, trackingURLs, assets. Soft-deprecates xdm:localeVariants (description prefix "Deprecated: Use xdm:variants instead..." + meta:status deprecated). Connector has not yet populated the deprecated field, so migration cost is minimal. Migrates paid-media-creative.example.4.json from xdm:localeVariants to xdm:variants. Adds paid-media-creative.example.5.json demonstrating Google Ads customizer expansion (4 rendered variants for 5/10/15/20% discount). Refs adobe#2178, AN-451840, AN-451211, AN-450480
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
Generalizes the
xdm:localeVariantsfield added in #2174 to a broaderxdm:variantsarray on thepaid-media-creativedatatype. Soft-deprecates the original field.Each variant in
xdm:variantsenumerates one materially different rendered version of the creative, regardless of what drives the difference:xdm:language(BCP 47). docsCustomizerAttributesubstitution — setxdm:customizers[](name, type, value, scope). docsWhy this is needed
Reviewing #2174 surfaced that Google Ads customizer attributes are not locale-keyed. A headline
Get {CUSTOMIZER.discount} on Adobe Creative Cloud Subscriptionwithdiscountlinked at the ad-group-criterion level resolves to distinct rendered headlines (5%,10%,15%,20%) per keyword. CJA Content Analytics needs each of these as its own snapshot for AI feature extraction. The narrowerxdm:localeVariantscouldn't represent this.Per Google Ads API docs, only one value resolves per impression (most-specific-wins among customer < campaign < adGroup < adGroupCriterion), but a single creative ID can render with many distinct values across delivery contexts.
Deprecation handling
Following the repo's soft-deprecation pattern (see #2127, #2158):
xdm:localeVariantsdescription prefixed with"Deprecated: Use xdm:variants instead...".meta:status: deprecatedadded.The deprecated
creativeLocaleVariantdefinition also getsmeta:status: deprecatedand a description prefix referring users to the newcreativeVariant.Schema additions
creativeCustomizersub-definition. Fields:xdm:name,xdm:type(enum:text | number | price | percent),xdm:value,xdm:scope(enum:customer | account | campaign | adGroup | adGroupCriterion | asset | other).creativeVariantsub-definition. Fields:xdm:variantID,xdm:language(BCP 47, optional),xdm:customizers[](optional), plus per-variant overrides forxdm:title,xdm:body,xdm:callToAction,xdm:destinationURL,xdm:displayURL,xdm:trackingURLs,xdm:assets.xdm:variantsarray onpaidMediaCreative, referencingcreativeVariant.Examples
paid-media-creative.example.4.json— migrated fromxdm:localeVariantstoxdm:variants(en-US / ar-AR / fr-FR).paid-media-creative.example.5.json— new, Google Ads customizer case (4 variants for 5% / 10% / 15% / 20% discount, scopeadGroupCriterion).Breaking changes
None. Additive new field plus soft deprecation. Existing examples 1-3 unchanged.
Validation
npm run validate components/datatypes/paid-media— 15 / 15 examples passingnpm test— 2390 mocha tests passingnpm run lint(prettier) — cleanRelated