Google Analytics Filter Challenge/Issue


#1

Hi,
I am trying to recreate this view https://goo.gl/kf2224 which includes only the “Default Channel Groupings” (see screenshot)

Organic Search
Direct
Referral
(Other)
Social
Paid Search

I was unsure of what the “Default Channel Grouping” (which is the primary Dimension). Again, see screenshot for that).

I was unaware of the api inputs that would generate such a result and found this: https://support.google.com/analytics/answer/3297892?hl=en

I tried the following formula which should match that result (I think). (Note that the “ga:xxxxxxxx” will need to be changed to your own # to test).

=Dump(GoogleAnalytics(“ga:74784227”,“ga:sessions,ga:bounceRate,ga:pageviewsPerSession,ga:sessionDuration”,“2017-09-01”,“2017-11-30”,“ga:Medium”,“gaid::-1”,“ga:source==direct;ga:medium==(not set),ga:medium==(none),ga:medium==organic,ga:hasSocialSourceReferral==Yes,ga:medium=~^(social|social-network|social-media|sm|social network|social media)$,ga:medium==email,ga:medium==affiliate,ga:medium==referral,ga:mediu”&“m=~^(cpc|ppc|paidsearch)$;ga:adDistributionNetwork!=Content,ga:medium=~^(cpv|cpa|cpp|content-text)$,ga:medium=~^(display|cpm|banner)$,ga:adDistributionNetwork==Content”,"-ga:sessions",25,FALSE,FALSE,“DEFAULT”))

The above filter settings generate an empty result: (note that in the above filter components the AND options are designated by a semi-colon, and or is designated by a single comma)
https://goo.gl/NRRo9a

If I change all “ANDs” to “Ors” (change the semicolons to commas) I get the following.

https://goo.gl/jRqSnk

Can you please help me with the correct formula to generate the result with only

Organic Search
Direct
Referral
(Other)
Social
Paid Search

as in the actual google analytics screenshot with the items listed above?

Thanks very much!
Chris


#2

Saw this post unanswered. Hopefully you resolved it by now.

Unfortunately, I can’t test your code at the moment.

But I do have one suggestion. By the looks of the amount of fields you’re looking for, in your case 6 different fields, wouldn’t it be easier for you to make a single Dump() formula for each field in a single column? So for example, in columns A1, input your Dump() formula to get the “Organic Search” only. And in column B1, modify the same Dump() formula but this time for the “Direct” field. Etc Etc.

It’s more work, but you’re only looking at 6 columns.And before applying the Dump() - Try the code first without it. If the first result looks right, re-apply the Dump() and continue on for the remainder of the columns.

One reason why I think this post is unanswered is because you didn’t exactly show us what results you expect. It would make things more clear to understand. If you have the time to create a mock table of the correct results and how you expect it to appear in excel, take a screenshot and attach it to this thread. Once you do that, I’ll consider your attempt using my personal google analytics account.