Velir / dbt-ga4

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

Support Export Change: Session traffic source information now available in the GA4 BigQuery Export #333

Open dgitis opened 4 months ago

dgitis commented 4 months ago

We've added a new record to the GA4 BigQuery Event export that contains the Google Ads and Manual campaign context information for each session present in the export. This information is repeated for every event in a session to enable fast and easy channel analysis in BigQuery of any event within a session. The exported data is the same as the data used in GA4 behavioral reporting.

from this update

I just wanted to create this issue for us to discuss support of this export.

The export includes processed session fields and Google Ads data from the Google Ads to Google Analytics integration.

image

It only exports to the events_ table. Intraday is not supported.

I will create a separate issue for the Google Ads tables as there are some other factors at play.

dgitis commented 4 months ago

Given that intraday isn't supported, I don't see the manual_campaign as too much of a priority.

If we were to support it, then we would need to add a variable to select between dbt-GA4 attribution and GA4 native attribution.

Additionally, we would need to fall back to dbt-GA4 attribution on partitions the precede the introduction of the new fields. I'm not sure how we do that without a variable, but we may be able to figure out something clever using INFORMATION_SCHEMA.

Finally, dbt-GA4 attribution is superior to GA4 attribution in my opinion.

GA4 attribution fields are all decoupled. For example, if someone visits from google / organic and then clicks on a UTM tagged link from link_click / internal with a campaign of popup, then that session would be attributed to google / organic with a campaign of popup.

The same problem happens in the reverse direction with last, non-direct attribution.

I do see a benefit to supporting this, though, because I often see people second-guess attribution differences between BigQuery and GA4. This would reduce that type of friction.

dgitis commented 4 months ago

In addition, Google added support for manual_creative_format, and manual_marketing_tactic.

We may want to ensure that whatever approach we settle on supports these fields as Google adding these to the export suggests that they may soon start using them for something worthwhile.