Home > Back-end >  google analytics reporting api permission
google analytics reporting api permission

Time:02-26

I'm making this custom dashboard using google analytics reporting api and MERN stack which allow users to create an account or login and choose whatever analytics they want to see depending on the filters they pick. But I'm having a problem where users have to add my API email manually to their account access management list so I can fetch Data from their google analytics accounts.

My Question is how can I use the reporting API without users having to give me permission?

I've seen a tutorial where users login with their google accounts but I want to implement my own User authentication.

CodePudding user response:

The first thing you need to understand is the diffrence bettween public and private user data.

Public data is data that is well public. Anyone can access it. Public videos upload to youtube for example is public data.

Private data on the other hand is data that is owned by user. In order to access private user data you need the consent of the owner of that data or someone that has access to it.

My Question is how can I use the reporting API without users having to give me permission?

The answer is that you cant. You can not access a users private google analytics data without the consent of that user. The user will need to authorize your application and consent to your application accessing their data.

I've seen a tutorial where users login with their google accounts but I want to implement my own User authentication.

You can do that you can have your own login server and authorize users. But you are still going to have to request their consent to access their private Google analytics data on top of that.

  • Related