Google Analytics API
  1. data
Google Analytics API
  • data
    • /data/ga
      GET
    • /data/mcf
      GET
    • /data/realtime
      GET
  • management
    • /management/accountSummaries
      GET
    • /management/accounts
      GET
    • /management/accounts/{accountId}/entityUserLinks
      GET
    • /management/accounts/{accountId}/entityUserLinks
      POST
    • /management/accounts/{accountId}/entityUserLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/entityUserLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/filters
      GET
    • /management/accounts/{accountId}/filters
      POST
    • /management/accounts/{accountId}/filters/{filterId}
      DELETE
    • /management/accounts/{accountId}/filters/{filterId}
      GET
    • /management/accounts/{accountId}/filters/{filterId}
      PATCH
    • /management/accounts/{accountId}/filters/{filterId}
      PUT
    • /management/accounts/{accountId}/webproperties
      GET
    • /management/accounts/{accountId}/webproperties
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      PUT
    • /management/clientId:hashClientId
      POST
    • /management/segments
      GET
  • metadata
    • /metadata/{reportType}/columns
  • provisioning
    • /provisioning/createAccountTicket
    • /provisioning/createAccountTree
  • userDeletion
    • /userDeletion/userDeletionRequests:upsert
  1. data

/data/realtime

GET
/data/realtime
data
Returns real time data for a view (profile).
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://analytics.googleapis.com/analytics/v3/data/realtime?ids=&metrics='
Response Response Example
{
  "columnHeaders": [
    {
      "columnType": "string",
      "dataType": "string",
      "name": "string"
    }
  ],
  "id": "string",
  "kind": "analytics#realtimeData",
  "profileInfo": {
    "accountId": "string",
    "internalWebPropertyId": "string",
    "profileId": "string",
    "profileName": "string",
    "tableId": "string",
    "webPropertyId": "string"
  },
  "query": {
    "dimensions": "string",
    "filters": "string",
    "ids": "string",
    "max-results": 0,
    "metrics": [
      "string"
    ],
    "sort": [
      "string"
    ]
  },
  "rows": [
    [
      "string"
    ]
  ],
  "selfLink": "string",
  "totalResults": 0,
  "totalsForAllResults": {
    "property1": "string",
    "property2": "string"
  }
}

Request

Query Params
ids
string 
required
Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
metrics
string 
required
A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified.
dimensions
string 
optional
A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'.
filters
string 
optional
A comma-separated list of dimension or metric filters to be applied to real time data.
max-results
integer 
optional
The maximum number of entries to include in this feed.
sort
string 
optional
A comma-separated list of dimensions or metrics that determine the sort order for real time data.

Responses

🟢200Successful response
application/json
Body
Real time data for a given view (profile).
columnHeaders
array [object {3}] 
optional
Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request.
columnType
string 
optional
Column Type. Either DIMENSION or METRIC.
dataType
string 
optional
Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc.
name
string 
optional
Column name.
id
string 
optional
Unique ID for this data response.
kind
string 
optional
Resource type.
Default:
analytics#realtimeData
profileInfo
object 
optional
Information for the view (profile), for which the real time data was requested.
accountId
string 
optional
Account ID to which this view (profile) belongs.
internalWebPropertyId
string 
optional
Internal ID for the web property to which this view (profile) belongs.
profileId
string 
optional
View (Profile) ID.
profileName
string 
optional
View (Profile) name.
tableId
string 
optional
Table ID for view (profile).
webPropertyId
string 
optional
Web Property ID to which this view (profile) belongs.
query
object 
optional
Real time data request query parameters.
dimensions
string 
optional
List of real time dimensions.
filters
string 
optional
Comma-separated list of dimension or metric filters.
ids
string 
optional
Unique table ID.
max-results
integer <int32>
optional
Maximum results per page.
metrics
array[string]
optional
List of real time metrics.
sort
array[string]
optional
List of dimensions or metrics based on which real time data is sorted.
rows
array [array] 
optional
Real time data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request.
string 
optional
selfLink
string 
optional
Link to this page.
totalResults
integer <int32>
optional
The total number of rows for the query, regardless of the number of rows in the response.
totalsForAllResults
object 
optional
Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request.
Additional properties
string 
optional
Key-value pair for the total value of a metric. Key is the metric name and the value is the total value for that metric.
Modified at 2023-08-15 05:39:07
Previous
/data/mcf
Next
/management/accountSummaries
Built with