Skip to content

Generalize paid-media-creative variants for Google Ads customizers (soft-deprecate localeVariants)#2179

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

Generalize paid-media-creative variants for Google Ads customizers (soft-deprecate localeVariants)#2179
ejsuncy wants to merge 1 commit into
adobe:masterfrom
ejsuncy:feature-2178-paid-media-creative-variants

Conversation

@ejsuncy
Copy link
Copy Markdown
Contributor

@ejsuncy ejsuncy commented May 22, 2026

What this PR does

Generalizes the xdm:localeVariants field added in #2174 to a broader xdm:variants array on the paid-media-creative datatype. Soft-deprecates the original field.

Each variant in xdm:variants enumerates one materially different rendered version of the creative, regardless of what drives the difference:

  • Meta Marketing API multi-language ads — set xdm:language (BCP 47). docs
  • Google Ads CustomizerAttribute substitution — set xdm:customizers[] (name, type, value, scope). docs
  • Both axes — set both fields populated.
  • Other networks (TikTok, Snapchat, LinkedIn) — same shape.

Why this is needed

Reviewing #2174 surfaced that Google Ads customizer attributes are not locale-keyed. A headline Get {CUSTOMIZER.discount} on Adobe Creative Cloud Subscription with discount linked 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 narrower xdm:localeVariants couldn'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:localeVariants description prefixed with "Deprecated: Use xdm:variants instead...".
  • meta:status: deprecated added.
  • Field still validates — consumers populating it continue to work.
  • Connector has not yet implemented populating it, so cost to migrate is minimal.

The deprecated creativeLocaleVariant definition also gets meta:status: deprecated and a description prefix referring users to the new creativeVariant.

Schema additions

  • New creativeCustomizer sub-definition. Fields: xdm:name, xdm:type (enum: text | number | price | percent), xdm:value, xdm:scope (enum: customer | account | campaign | adGroup | adGroupCriterion | asset | other).
  • New creativeVariant sub-definition. Fields: xdm:variantID, xdm:language (BCP 47, optional), xdm:customizers[] (optional), plus per-variant overrides for xdm:title, xdm:body, xdm:callToAction, xdm:destinationURL, xdm:displayURL, xdm:trackingURLs, xdm:assets.
  • New xdm:variants array on paidMediaCreative, referencing creativeVariant.

Examples

  • paid-media-creative.example.4.json — migrated from xdm:localeVariants to xdm:variants (en-US / ar-AR / fr-FR).
  • paid-media-creative.example.5.jsonnew, Google Ads customizer case (4 variants for 5% / 10% / 15% / 20% discount, scope adGroupCriterion).

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 passing
  • npm test — 2390 mocha tests passing
  • npm run lint (prettier) — clean

Related

…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
@ejsuncy ejsuncy marked this pull request as ready for review May 22, 2026 17:22
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