There were records where traffic source medium was "organic", even though that same hit contained a GCLID and the traffic_source name was 'google'
This should be impossible, as the GCLID would only populate on an ad (and therefore should be cpc/paid traffic source medium)
This should be impossible, as the GCLID would only populate on an ad (and therefore should be cpc/paid traffic source medium)
Comments
CASE
WHEN REGEXP_CONTAINS(page_location, r'gclid=.+') AND traffic_source_source = 'google' THEN 'cpc'
/* Known GA4 misattribution bug */
ELSE traffic_source_medium
END
AS traffic_source_medium