I would like to use the Google Analytics API to get the data displayed on the Acquisition Overview webpage. Especially, I need to get the sessions (formerly called visits) break by Default channel grouping : Direct, Organic Search, Referral, Social, Paid Search, Email, Display and (Other).
As explained here, these groups are based on regex. Therefore, it might be possible to recode these rules, but I would prefer to use these groups as a dimension.
I googled it and most of the answers are referring to Multi-Channel Funnels (MCF), but according to the MCF dimensions & metrics reference, it's more about conversion.
Does anyone know how to use the Google Analytics API (or GA MCF API) to get such data ?
Thanks a lot !
Acutaly I think you should be looking at the Core Reporting Api and dimensions and metrics
The thing that's going to be a little tricky is that first column. That column is Traffic Type and not something you can export directly. It is calculated based upon Source / medium.
Direct = Source not equal (direct) and Medium not equal to organic referral and cpc
Campaign = Source not equal to (direct) and Medium not equal to organic referral and cpc
organic = Medium is equal to organic
paid = medium is equal to cpc
I cant remember what social was I will have to look into that.
Here is the link where you can find the GA definitions for Default Channel Groupings: https://support.google.com/analytics/answer/3297892?hl=en&ref_topic=3125765
When you go to this link, just click on the edit icon for the channel whose definition you want to see.
For example, for Social, the definition is:
Social Source Referral exactly matches Yes OR Medium matches regex ^(social|social-network|social-media|sm|social network|social media)$
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With