Core Reporting API : 500 Internal Server Error

1,175 views
Skip to first unread message

bon sethi

unread,
Jan 14, 2015, 11:08:22 PM1/14/15
to google-analytics...@googlegroups.com
I am getting 500 Internal Server error in response from Core Reporting API when there is a segment with filters present in the query. 

Query explorer gives the same error. 

For example, when segment = gaid::-2 and filters = ga:sessions>120.44;ga:goalCompletionsAll>0,ga:goalConversionRateAll>0 , the response returned is 

{"errors":[{"domain":"global","reason":"internalError","message":"There was an internal error."}],"code":500,"message":"There was an internal error."}

Has anyone else experienced something similar ?

Rick Tait

unread,
Jan 16, 2015, 6:19:24 PM1/16/15
to google-analytics...@googlegroups.com
bon,

i can reproduce the behaviour you describe, but only when i add the ga:goalConversionRateAll parameter to the call. the reason for this is that ga:goalConversionRateAll is not allowed to be used in segments (this can be seen by hovering over it in the metrics dropdown list in the Query Explorer. you will see something like: Allowed in Segments: No). 

as a test, i made the following query:
  • metrics: sessions
  • dimensions: browser
  • segment: one of my segments segmenting out all Android users
  • filter: ga:sessions>1000 and ga:goalCompletionsAll>0
and the data returned was as expected. the call i made:


so the bottom line is, you can't use ga:goalConversionRateAll when using segments (likely because its a PERCENT, not an INTEGER). same goes for ga:goalAbandonRateAll and a number of other metrics. there doesn't appear to be an easily parsable canonical list of these, but according to the Core Reporting API Dev Guide/Segments:

Dimensions and Metrics allowed in segments.
Not all dimensions and metrics can be used in segments. To review which dimensions and metrics are allowed in segments visit the Dimensions and Metrics Explorer.

hope this helps!

-RMT

bon sethi

unread,
Jan 20, 2015, 3:26:31 PM1/20/15
to google-analytics...@googlegroups.com
Thank you, Rick, for pointing that out !! Going to try it very shortly.  
Reply all
Reply to author
Forward
0 new messages