AbdFatah / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Dimensions value in API response invalid. #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
---------------------------------------------------------------------------
NOTE: This issue tracking system is for Google Analytics developer products
only.
If you are not a developer/programmer visit:
http://www.google.com/analytics/support.html
---------------------------------------------------------------------------
Name of affected component: Data Export API

Name of related library and version, if applicable (e.g. Java, Python,
HTTP, Objective-C, etc.): .NET although I believe this is related to the API 
response.

Issue summary:
Dimensions don't appear to be returned as Arrays, rather a single element. This 
breaks deserialization in the .NET client library.

Steps to reproduce issue:
1. Make a Core Reporting API call requesting a single dimension.
2. View the response

Expected output:
What do you expect to see after performing the above steps?

 "dimensions": [
   "ga:country"
  ],
  "metrics": [
   "ga:visits"
  ],

Actual results:
What do you actually see after performing the above steps?

"dimensions":"ga:country",
  "metrics": [
   "ga:visits"
  ],

Original issue reported on code.google.com by gr...@defiantbyte.com on 14 Feb 2012 at 1:09

GoogleCodeExporter commented 9 years ago
I did additional test with 2 dimensions as opposed to one, and they still 
aren't returned with the brackets indicating an array. My thinking was that 
maybe there was some "if one, no array" logic in place.

Also this is against the CoreReportingAPI.

Original comment by gr...@defiantbyte.com on 14 Feb 2012 at 9:56

GoogleCodeExporter commented 9 years ago
Just noting that this was an acknowledged issue in the Core API group:

http://code.google.com/apis/analytics/community/exportApiGroup.html?place=topic%
2Fgoogle-analytics-data-export-api%2FdJrRC_1dmeA%2Fdiscussion

Original comment by defiantb...@gmail.com on 5 Mar 2012 at 3:47

GoogleCodeExporter commented 9 years ago
The dimensions fields returns a string in version 3.0 of the API.

Your client library parsing should handle this appropriately.

There is a bug with the docs that we'll update shortly, but the discovery api 
does return this value accurately as a string.

Original comment by n...@google.com on 31 May 2012 at 8:15