Velir / dbt-ga4

dbt Package for modeling raw data exported by Google Analytics 4. BigQuery support, only.
MIT License
311 stars 134 forks source link

Google Discover Source and Channel Attribution #332

Open markloomis32 opened 2 months ago

markloomis32 commented 2 months ago

Google Discover traffic is not natively tracked by GA4 as a source or traffic channel.
The traffic can be identified as traffic with a referrer ofandroid-app://com.google.android.googlequicksearchbox or com.google.android.googlequicksearchbox. The traffic usually is shown as direct with no associated source.

The goal would be to set the traffic channel as "Organic Search" and set the source as "google discover" to be available in the sessions and models.

I'm happy to work on contributing to this if there is broad interest in addressing the issue in the package

dgitis commented 2 months ago

I have done this on a per-client basis. I think I used "News Search" or "News Aggregator" as a custom channel and added Bing and Yahoo news to that channel.

I would be careful about deviating from the standard channel definitions as package defaults. That's not a no from me, we've definitely deviated from Google definitions elsewhere, but we should be careful about doing it too much.

Another issue that I have is that it only works with the Android app. Apple suppresses the referrer on iOS devices so that people who install the app on iOS can't be tracked.

Using Google Search Console is a better place to get this data as it includes iOS data tracked by Google within the app.

markloomis32 commented 2 months ago

@dgitis understood - when you did this for clients did you use the macro override functionality in the package or did you adjust it manually in the sessions models?

dgitis commented 2 months ago

Macro override