You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -62,6 +62,16 @@ Click IDs are processed but **not stored as raw values**. If no explicit `utm_so
62
62
63
63
If multiple click IDs exist, the system prioritizes: `scclid` > `irclickid` > `msclkid` > `ttclid` > `fbclid` > `gclid`.
64
64
65
+
### Conflict resolution (deterministic)
66
+
67
+
If you provide conflicting values (e.g., both `sm_utm_source` and `utm_source`, or both direct keys and `utmParams`), SourceMedium resolves each final field with a deterministic waterfall:
68
+
69
+
-**UTM fields**: direct `sm_utm_*` → direct `utm_*` → parsed from `sm_utmParams` → parsed from `utmParams` → parsed from `GE_utmParams`
70
+
-**`utm_source` only**: if still missing, infer from click IDs (`scclid` → `irclickid` → `msclkid` → `ttclid` → `fbclid` → `gclid`)
71
+
-**Referrer**: `sm_referrer` → `referrer`
72
+
73
+
If the same normalized key appears multiple times at the same level (e.g., `utm_source` and `UTM_SOURCE`), SourceMedium de-dupes deterministically using `MAX()` (lexicographically largest value). To avoid surprises, only set each key once.
If your `customAttributes` data is messy (duplicate keys, multiple sources provided), SourceMedium applies a deterministic waterfall to resolve each final field.
89
+
90
+
#### Field-level precedence
91
+
92
+
For each UTM field, the **first non-empty value wins** (highest → lowest):
`referrer` is resolved similarly: `sm_referrer` → `referrer`.
102
+
103
+
#### Duplicate keys (same tier)
104
+
105
+
If the same normalized key appears multiple times at the same tier (for example both `utm_source` and `UTM_SOURCE`, or repeated `utm_source` entries), SourceMedium de-dupes deterministically using `MAX()` (lexicographically largest value after decoding/cleaning).
106
+
107
+
To avoid surprises, only set each key once.
85
108
86
109
<Note>
87
110
Click IDs are processed as a **fallback** (see below), but the raw click ID values are not stored as attribution fields.
@@ -106,6 +129,11 @@ When only a click ID is present (no explicit `utm_source`), the system infers a
106
129
107
130
If an order has multiple click IDs, the highest-priority click ID wins. This preserves more specific intent signals (like affiliates or smaller platforms) over ambient IDs from high-volume platforms.
108
131
132
+
Click IDs are checked in this order:
133
+
1. Direct `customAttributes` click ID keys (e.g., `scclid`, `gclid`)
134
+
2. Click IDs embedded inside `utmParams`
135
+
3. Click IDs embedded inside `GE_utmParams`
136
+
109
137
<Note>
110
138
Click IDs are **fallback only**. If an explicit `utm_source` exists, it takes precedence over any click ID inference.
0 commit comments