rxz99 / analytics-issues

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

request for ga:productSku returns "message":"Login Required" and null gaData.getRows(). #701

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Name of affected component: Core Reporting API

Name of related library and version, if applicable - Java

Issue summary:
I try to get analytics with dimension ga:productSku. I obtain 
gaData.getRows()=null and Self link: 
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:3294251&dimensions=ga:pro
ductSku&metrics=ga:bounces&start-date=2015-07-14&end-date=2015-07-14
which means particularly: 
{"error":{"errors":[{"domain":"global","reason":"required","message":"Login 
Required","locationType":"header","location":"Authorization"}],"code":401,"messa
ge":"Login Required"}}

Steps to reproduce issue:
1. I use next auth data:
AccountId : 1824981
"username":"446368808773-74sbv0i61c3oeoercuta781vfr69gi32@developer.gserviceacco
unt.com"
profileId: 3294251
"name":"www.e96.ru"
2. I use next java-code:
        String ids = "ga:" + profileId;
        String startDate = GA_DATE_FORMAT.format(date);
        String endDate = startDate;
        String dimensions = "ga:productSku";
        String metrics = "ga:bounces";
        Get apiQuery = analytics.data().ga()
                .get(ids, startDate, endDate, metrics)
                .setDimensions(dimensions);
3.

Expected output:
What do you expect to see after performing the above steps? - I expect to obtin 
populated object gaData.getRows();

Actual results:
What do you actually see after performing the above steps? - I obtain 
gaData.getRows()=null and Self link: 
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:3294251&dimensions=ga:pro
ductSku&metrics=ga:bounces&start-date=2015-07-14&end-date=2015-07-14
which means particularly: 
{"error":{"errors":[{"domain":"global","reason":"required","message":"Login 
Required","locationType":"header","location":"Authorization"}],"code":401,"messa
ge":"Login Required"}}

Notes:

What should I do to get correct SKU data?

Original issue reported on code.google.com by andrew.y...@gmail.com on 15 Jul 2015 at 11:40

GoogleCodeExporter commented 8 years ago
Hello, 

This tool is only for reporting issues and requesting new features for the 
Google Analytics libraries. This tool is not designed to provide help. 

If you are a developer and you need help, ask a question or look for an answer 
in one of the groups listed here: https://developers.google.com/analytics/help/

If you are not a developer and you need help, ask a question in this forum: 
https://productforums.google.com/forum/#!forum/analytics or search for help in 
the help center: https://support.google.com/analytics

Original comment by catherin...@google.com on 15 Jul 2015 at 4:11