Google Analytics
The Google Analytics module enables you to retrieve analytics data in your Google Analytics.
Getting Started with Google Analytics
Prerequisites
- A Google Analytics account – you can create one at www.google.com/analytics
- A Universal Analytics property created (in order to obtain a View ID)
Connecting Google Analytics to Integromat
1. Go to Integromat and open the Google Analytics module's Create a connection dialog.
2. Enter a name for the connection to the Connection name field and click Continue.
After you click the Continue button, Integromat will redirect you to the Google website where you will be prompted to grant Integromat access to your account.
Confirm the dialog by clicking the Allow button.
The connection has been established.
Please Note: Some adblocking browser plugins could block the Google Analytics app based on the Analytics keyword in the app. It is recommended to disable the plugins if you encounter such an error.
Actions
Get Analytics Reports
Retrieves the analytic data for the specified website.
Connection | Establish a connection to your Google Analytics account. | ||||||
View ID | Enter the View ID. See How To Obtain a View ID section. | ||||||
Sampling Level | Select the sampling level:
| ||||||
Date Ranges | Specify at least one date range you want to return results for. When no date range is specified, no results will be returned. See the supported date and time formats. | ||||||
Dimensions | Specify dimensions you want to include in the module's output. For example, the dimension ga:city indicates the city from which a session originates.
| ||||||
Dimension Filter Clauses | Add groups of dimension filters. The dimension filter specifies the filtering options on a dimension. For more details about dimension filters, please refer to Dimension Filter documentation. | ||||||
Metrics | Add metrics. Metrics are quantitative measurements. For example, the metric
| ||||||
Metric Filter Clauses | Set the metric filters. Select the operator for combining multiple metric filters and add metric filters. For more details about metric filter, please see metric filters documentation. | ||||||
Filters Expression | Enter a dimension or metric on which to filter, followed by the filter expression. For example, the following expression selects | ||||||
Order By | Set the sorting options.
| ||||||
Segments | If you need the report to be segmented, define segments you want to return. You can create a new segment (a dynamic segment) or enter the ID of the existing segment to be used. | ||||||
Pivots | Specify the pivot section. Please find the description of pivot fields in the GA4 v4 API documentation. | ||||||
Cohorts | Add and specify cohorts – cohort is a group of users who share a common characteristic. Please find the description of cohort fields in the GA4 v4 API documentation. | ||||||
Lifetime Value | If the value of Lifetime Value is disabled:
When the Lifetime Value is enabled:
| ||||||
Include Empty Rows | Enable to include rows if all the retrieved metrics are equal to zero. The default is disabled which will exclude these rows. | ||||||
Use Resource Quotas | Enables resource based quotas, (defaults to |
Make an API Call
Allows you to perform a custom API call.
Connection | Establish a connection to your Google Analytics account. |
URL | Enter a path relative to For the list of available endpoints, refer to the Google Analytics v4 API Documentation. |
Method | Select the HTTP method you want to use: GET POST PUT PATCH DELETE |
Headers | Enter the desired request headers. You don't have to add authorization headers; we added those for you. |
Query String | Enter the request query string. |
Body | Enter the body content for your API call. |
Example of Use - Get Analytics Reports.
The following API call returns analytics reports within the date range and specified dimensions and in your Google Analytics account:
URL:/v4/reports:batchGet
Method:POST
Body:
{ "reportRequests": [ {"viewId": "{viewID}", "dateRanges": [{"endDate": "2021-03-23", "startDate": "2020-01-01"}], "dimensions": [{"name": "ga:browser"}, {"name": "ga:city"}],}],}
The result can be found in the module's Output under Bundle > Body > reports.
In our example, the report data were returned:
How To Obtain a View ID
1. Log in to your Google Analytics account.
2. Navigate to the Admin page and click +Create Property button.
3. Fill in the property details, click Show advanced options () and enable the Create a Universal Analytics property option.
4. Enter your website URL and finish setting up the property – see GA documentation for further details.
5. Switch to the Universal Analytics property (UA-XXXXXXXXX-2).
6. Open View Settings and copy the View ID.