Skip to main content

Misattribution Fixes

There are several nuances when it comes to finding the "correct" source of an event or a session. Below is our subjective interpretation of resolving some of the misattribution issues that come with the GA4 BigQuery export.

Do you know of any other cases that should be fixed?

Please contact us at support@ga4dataform.com if you know of any other misattribution issues that should be fixed!

In the table below, we show the input and output values when applying fixes for different scenarios. The input row represents the raw data (GA4 export), while the output row shows how we modify each field in the fixed_traffic_source struct within the ga4_events table. We then use this struct to determine the session traffic source in the ga4_sessions table.

You can scroll the table horizontally to view all columns.

Test CaseStatesourcemediumcampaigngclid/gbraid/wbraid/dclidsrsltidpage_referrerignore_referrer
1. Organic when GCLID is presentInputgoogleorganic(organic)CjwKCAjwitShBhA6E
Outputgooglecpc(not set)CjwKCAjwitShBhA6E
2. Non-Google referral with GCLIDInputpinterest.comreferral(referral)CjwKCAjwitShBhA6E
Outputgooglecpc(not set)CjwKCAjwitShBhA6E
3. UTM with GCLID (no change)Inputgoogle_cpcpaid_searchnon_branded_searchCjwKCAjwitShBhA6E
Outputgoogle_cpcpaid_searchnon_branded_searchCjwKCAjwitShBhA6E
4. SRSLTID presentInputmail.google.comreferral(referral)AfmBOop4z
OutputgoogleorganicShopping Free ListingsAfmBOop4z
5. Only GCLID presentInputCjwKCAjwitShBhA6E
Outputgooglecpc(not set)CjwKCAjwitShBhA6E
6. Google Android app referrerInputandroid-app://com.google.android.gm/
Outputgoogleorganic
7. Social Android app referrerInputandroid-app://com.pinterest/
Outputcom.pinterestsocial
8. Other Android app referrerInputandroid-app://de.idealo.android/
Outputde.idealo.androidandroid-app
9. Referrer present, ignore_referrer = FALSEInputdomain123.com/test456FALSE
Outputdomain123.comreferral

Column Descriptions

Column NameDescription
Test CaseName of the scenario being tested
StateWhether the row represents input data or expected output after transformation
sourceThe traffic source (e.g.: google, pinterest.com)
mediumThe marketing medium (e.g.: organic, cpc, referral)
campaignThe marketing campaign name
gclid/gbraid/wbraid/dclidGoogle Click Identifier - used to track ad clicks
srsltidGoogle Shopping Free Listings tracking parameter
page_referrerThe URL that referred the traffic
ignore_referrerFlag to indicate whether to ignore the referrer information