"Selected dimensions and metrics cannot be queried together"

1,315 views
Skip to first unread message

felix.k...@rdotdisplays.com

unread,
Feb 18, 2019, 3:36:42 AM2/18/19
to google-analytics-spreadsheet-add-on
Hi,

I get the error response: "Selected dimensions and metrics cannot be queried together." when using the following metrics and dimensions:

Metricsga:users,ga:goal1Completions
Dimensionsga:acquisitionTrafficChannel, ga:yearWeek

According to the Dimensions & Metrics Explorer (https://developers.google.com/analytics/devguides/reporting/core/dimsmets) - this error seems to be expected.


In google analytics custom reports I use the following dimensions and metrics and they work fine (image below).


Skärmavbild 2019-02-18 kl. 09.24.50.png

I believe that they are the same as I use in the spreadsheet, but obviously not since I get the error...

How can I find the metrics and dimensions names that I use in the report below? Any other ideas? It would be awesome to just re-use the custom reports that you've already made in Google Analytics in the Spreadsheet Plugin.


Thanks.

//Felix


Skärmavbild 2019-02-18 kl. 09.24.50.png

Mike Sullivan

unread,
Feb 21, 2019, 2:45:54 PM2/21/19
to google-analytics-spreadsheet-add-on
Go to the metrics explorer: Select UI Names and do a search. It will show you the API name to use for the field.
https://developers.google.com/analytics/devguides/reporting/core/dimsmets

Letzen.M...@duke-energy.com

unread,
Feb 22, 2019, 9:03:00 AM2/22/19
to google-analytics-spreadsheet-add-on
I'd be careful using the Dimensions & Metrics Explorer. For example, Google will tell you " It would not be logical to combine Sessions with a hit-level dimension like Page", yet the Explorer says you can mix pagePath dimension w/the sessions metric. 

felix.k...@rdotdisplays.com

unread,
Feb 23, 2019, 12:24:15 PM2/23/19
to google-analytics-spreadsheet-add-on
Ok... So what should I do? Still can't find which dimensions and metrics to use to replicate the report.

felix.k...@rdotdisplays.com

unread,
Feb 23, 2019, 12:29:29 PM2/23/19
to google-analytics-spreadsheet-add-on
Thanks. If I search "Traffic Type" I get zero results (Traffic Type is the UI name that appears in my custom report in GA - see screenshot in my first post). If I search "Users" I get multiple results which makes it hard to know which one to choose. If you would try to replicate the results that I get in the custom report according to the information you have in the screenshot, what would you do? ... :)

Letzen.M...@duke-energy.com

unread,
Feb 24, 2019, 3:23:19 PM2/24/19
to google-analytics-spreadsheet-add-on
Sadly, GA will let you make combinations that you shouldn't make, and until Google addresses the Dimensions & Metrics Explorer misinformation, you'll be on your own. General rule of thumb is to combine only same-scope dimensions & metrics. You can usually determine what you can combine by seeing what the Standard reports allow you to combine as secondary dimensions or as comparison metrics in the graphs. Also, do you really need the Users metric or will Sessions satisfy your needs? After all, Users is not about people but devices and browsers w/the GA cookie accessing your site, and the Sessions metric will work w/your session-scoped ga:acquisitionTrafficChannel. Additionally, acquisitionTrafficChannel is a Lifetime dimension; is that what is really being collected in your custom dimension Traffic Type? Consider whether ga:channelGrouping will satisfy your needs, since, unlike ga:acquisitionTrafficChannel, it works with your time dimension ga:yearWeek. Good luck.

Letzen.M...@duke-energy.com

unread,
Feb 25, 2019, 6:55:10 AM2/25/19
to google-analytics-spreadsheet-add-on
Sorry - forgot that traffic type can be a Secondary dimension in some Standard reports; have never used it. Traffic Type is equivalent to ga:medium, most of the time. I say most of the time, because GA will throw in ga:source as the Traffic Type value in some cases, i.e. "direct", or a specific value related to the medium, i.e. "paid" for a "cpc" medium.

You can play w/these in the Acquisition > All Traffic > Channels report. Look at the various Primary Dimensions adding Traffic Type as a Secondary Dimension to see where they are mostly the same. Since Traffic Type is not available in the Core Reporting API, I'd consider changing your Custom report to Channel Grouping (ga:channelGrouping), source/medium (ga:sourceMedium) or medium(ga:medium).
Reply all
Reply to author
Forward
0 new messages