Skip to content

mergeAttribution

mergeAttribution(__namedParameters): AttributionParams | undefined

Defined in: context/mergeAttribution.ts:44

Merge the three attribution layers into a single AttributionParams value suitable for FrakContextManager.update.

Priority per field:

  1. perCall (wins)
  2. defaults (merchant-level, backend > SDK static, already pre-merged)
  3. Hardcoded fallbacks resolved later by FrakContextManager

Special rules:

  • perCall === null returns undefined (explicit disable: no UTM/ref/via).
  • perCall === undefined (no opinion) yields at least {} so FrakContextManager applies its one hardcoded default, utm_source=frak. There are no others: resolveAttributionValues leaves every other key undefined unless supplied.
  • utm_content never comes from defaults; only productUtmContent or perCall.utmContent can populate it.

MergeAttributionInput

AttributionParams | undefined