Each client library provides a single analytics service object to access all Core
Reporting API data. To create the service object you generally have to go through the
following steps:
Register your application in the Google Cloud Console.
Authorize access to Google Analytics data.
Create an Analytics service object.
https://developers.google.com/analytics/devguides/reporting/core/v3/coreDevguide