Reporting API is used in order to receive Google Analytics data. Service-account key and view ID are required to be provided by the client. Below you can find all the information on how the client can get necessary data.
- Setting API
Before you start the work use setting tool in order to create a Google API Console project, enable API and register your account credentials.
- Generating service-account credentials
1. Open the Service accounts page. If prompted, select a project.
2. Click Create service account.
3. In the Create service account window, type a name for the service account, and select Furnish a new private key.
Your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of this key.
- Connecting Service account with Google Analytics account
The new service account will obtain e-mail alike with the following:
Use this e-mail for adding a user to the Google Analytics view to which you need an access through API.
- Retrieving view ID
Use Account Explorer in order to retrieve necessary view ID.
Limitations in present integration with Google Analytics
1. Service-account key and view ID get connected to Facebook account. Thus, one view corresponds with only one Facebook account. Combining several views under one Facebook account is not supported for now. Secret key also gets connected to the Facebook account.
2. Difference between Google Analytics and Facebook Account time zones is not considered. In order to get information about time zone you will need an access to Management API.
3. There is a limitation in API method used for getting reports: 4 or less inquiries in a pack. Potentially it can decrease data retrieving speed in great ads amount case. Overcoming this limitation by asynchronous inquiries sending is not supported for now.
4. Google Analytics can't be used in automations because of announced inaccuracy in the last few hours data.
5. Facebook and Google Analytics entities get connected by UTM-parameters. The next correspondence is used for now: