When we create application using Google Api for service then our service access Google analytics using it’s own on behalf for user. In that case we have to add email of Service account to Google analytics.
On google api console you can find service account information. You have to add this email to you Google analytics to get access of analytics data other wise google api will throw exception that user has not google analytics account.
How to add service account to google analytics
Open Google Analytics Page
- Click on admin link
- Select user management
- Add google api service account image address
- Select permission to read & analysis
- Click on Add button
- After adding can change access permission.
Now you can user Google api service account for accessing analytics data.