Google Analytics integration
In short
Run reports on your GA4 properties. Connect it on the Integrations page; your app then calls Google Analytics through Sapilon without ever holding a Google credential.
Lets your app list the Google Analytics 4 properties the connected account can see and run reports on them — visitors, page views, conversions, by any dimension.
Connecting
On the Integrations page choose Connect on Google Analytics, sign in to Google and allow access. Under Advanced you can use your own Google OAuth app instead of Sapilon’s.
- Your app can read the reports of every property this account can see. It cannot change anything.
- Sapilon’s Google app is still in verification: you may see an “unverified app” screen. Advanced → Bring your own OAuth app avoids it.
What your app can do
Only these requests are available; anything else is refused.
GET /accountSummariesGET /properties/*/metadataPOST /properties/*
How the agent uses it
Use integrations.request('google-analytics', …); report paths are relative to https://analyticsdata.googleapis.com/v1beta (the GA4 Data API).
GET /accountSummaries— accounts and their properties (property: 'properties/123'; routed to the Admin API for you).GET /properties/{id}/metadata— the dimensions and metrics you can ask for.POST /properties/{id}:runReport— Example:{ method: 'POST', path: '/properties/123:runReport', body: { dateRanges: [{ startDate: '28daysAgo', endDate: 'today' }], dimensions: [{ name: 'pagePath' }], metrics: [{ name: 'screenPageViews' }], limit: 20 } }. Also:runRealtimeReportand:batchRunReports.
Read-only.
More from Google: https://developers.google.com/analytics/devguides/reporting/data/v1