(Required) Parameter name | Description |
---|---|
ids | Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
metrics | A comma-separated list of Analytics metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. |
(Optional) Parameter name | Description |
dimensions | A comma-separated list of real-time dimensions. E.g., 'rt:medium,rt:city'. |
filters | A comma-separated list of dimension or metric filters to be applied to real-time data. |
max-results | The maximum number of entries to include in this feed. |
sort | A comma-separated list of dimensions or metrics that determine the sort order for real-time data. |
(Standard) Parameter name | Description |
callback | Name of the JavaScript callback function that handles the response. Used in JavaScript JSON-P requests. |
prettyPrint | Returns the response in a human-readable format if true. Default value: true. When this is false, it can reduce the response payload size, which might lead to better performance in some environments. |
quotaUser | Lets you enforce per-user quotas from a server-side application even in cases when the user's IP address is unknown. This can occur, for example, with applications that run cron jobs on App Engine on a user's behalf. You can choose any arbitrary string that uniquely identifies a user, but it is limited to 40 characters.Overrides userIp if both are provided. Learn more about capping usage. |
userIp | Lets you enforce per-user quotas when calling the API from a server-side application. Learn more about capping usage. |
The Real Time Reporting API, in limited beta, is available for developer preview only. Sign up to access the API.
The Real Time Reporting API enables you to request real time data—for example, real time activity on your property—for an authenticated user.
You can use the Real Time Reporting API to:
Authorization
Calls to the Google Analytics Real-time API requires authorization with at least one of the following scopes (read more about authentication and authorization).
Scope | access granted |
---|---|
https://www.googleapis.com/auth/analytics | Full access to Google Analytics accounts up to the level of the authenticated users access. |
https://www.googleapis.com/auth/analytics.readonly | Read only access to the Authenticated users Google Analytics accounts |