AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.3K members online now
2.3K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Seperate Google account with access, Calling Analytics API from account with access.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am creating a tool to generate reports from Analytics, one of the problems I have is that my account has access to the Analytics, but when I created a project in google console inside the API Manager. How is the project linked with the main account (That I have access to) to actually use the API for it? Should I create the API keys/credentials from the main account (Not the one that has access)? When I run the sample Hello Analytics I get the profile ID returned but receive an NPE for the result. I am assuming that the project in the API Manager was pointed to no analytics account. (I still do not understand much how to setup the API).

 

Cheers,

Sunny

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Sunny
August 2016

Re: Seperate Google account with access, Calling Analytics API from account with access.

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I have solved the problem by setting profile ids manually.

View solution in original post

Re: Seperate Google account with access, Calling Analytics API from account with access.

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

I was able to check the profile ID, and it has matched. Im trying to find out why the sessions keep returning null.

Marked as Best Answer.
Solution
Accepted by topic author Sunny
August 2016

Re: Seperate Google account with access, Calling Analytics API from account with access.

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I have solved the problem by setting profile ids manually.