Skip to main content

Google Analytics - UA Component

Manage Google Analytics

Component key: google-analytics

Description

Google Analytics is Google's platform of analytics tooling. This component provides actions related to the Universal Analytics (UA) API.

On July 1st 2023, UA will stop processing analytics data in favor of Google Analytics 4. If you are building a new integration, please see the Google Analytics - GA4 component.

Connections

Google Analytics OAuth 2.0

The Google Analytics component authenticates requests through Google's OAuth 2.0 service.

To create a Google Analytics developer account and authenticate, follow their Configure OAuth Consent guide

Now, you will have to configure OAuth 2.0 settings. Create a new Google Analytics connection of type OAuth 2.0.

  • For Client ID and Client Secret enter the values that you got from the Google Cloud Platform auth settings.
  • For Scopes choose from the list found on Google's service scopes documentation
InputNotesExample
Authorize URL

The OAuth 2.0 Authorization URL for Google Calendar

https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent
Client ID

Provide a string value for the client Id of your OAuth 2.0 application.

Client Secret

Provide a string value for the client secret of your OAuth 2.0 application.

Scopes

A space-delimited set of one or more scopes to get the user's permission to access.

https://www.googleapis.com/auth/analytics https://www.googleapis.com/auth/analytics.manage.users https://www.googleapis.com/auth/analytics.edit https://www.googleapis.com/auth/analytics.readonly
Token URL

The OAuth 2.0 Token URL for Google Analytics

https://oauth2.googleapis.com/token

Data Sources

Account Names

A picklist of account names | key: accountNames | type: picklist

InputNotesExample
Connection

Custom Metrics

A picklist of Custom Metrics | key: getCustomMetric | type: picklist

InputNotesExample
Account ID37746615
Connection
Web Property IDUA-12345678-1

Views (Profiles)

A picklist of views (profiles) | key: profiles | type: picklist

InputNotesExample
Account ID37746615
Connection
Web Property ID~all

Web Property

A picklist of Web Properties | key: getWebProperty | type: picklist

InputNotesExample
Account ID37746615
Connection

Actions

Get Custom Dimension

Get a Custom Dimensions | key: getCustomDimension

InputNotesExample
Account ID37746615
Connection
Custom Dimension ID
Web Property IDUA-12345678-1

Get Custom Metric

Get a Custom Metric | key: getCustomMetric

InputNotesExample
Account ID37746615
Connection
Custom Metric ID
Web Property IDUA-12345678-1

Get Profile

Get a Google Analytics Profile | key: getProfile

InputNotesExample
Account ID37746615
Connection
Profile ID
Web Property ID

Get View Data

Get Analytics data for a View (profile) | key: getData

InputNotesExample
Connection
Additional Dimensions

Must be a comma seperated list of dimensions i.e. 'ga:browser,ga:city'

Additional Metrics

Must be a comma seperated list of metrics i.e. 'ga:sesions,ga:pageviews'

Standard Dimensionsga:browser
End Date2022-02-02
Filters
Profile ID840123345
Include Empty Rows
Items Per Page1000
Standard Metricsga:pageviews
Analytics Segment
Start Date2022-02-01
Start Index1

Get Web Property

Get Web Property | key: getWebProperty

InputNotesExample
Account ID37746615
Connection
Web Property IDUA-12345678-1

Link a User by email to specified Account | key: addUser

InputNotesExample
Account ID
Connection
Email

List Accounts

Paginated listing of Accounts | key: listAccounts

InputNotesExample
Connection
Items Per Page1000
Start Index1

List Custom Dimensions

List Custom Dimensions for the given Web Property | key: listCustomDimensions

InputNotesExample
Account ID37746615
Connection
Items Per Page1000
Start Index1
Web Property IDUA-12345678-1

List Custom Metrics

List Custom Metrics for the given Web Property | key: listCustomMetrics

InputNotesExample
Account ID37746615
Connection
Items Per Page1000
Start Index1
Web Property IDUA-12345678-1

List Profiles

List Profiles associated with the specified Account ID | key: listProfiles

InputNotesExample
Account ID37746615
Connection
Items Per Page1000
Start Index1
Web Property ID~all

List Web Properties

List Web Properties associated with the specified Account ID | key: listWebProperties

InputNotesExample
Account ID37746615
Connection
Items Per Page1000
Start Index1

Raw Request

Send raw HTTP request to Google Analytics | key: rawRequest

InputNotesExample
Connection
Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
Debug Request

Enabling this flag will log out the current request.

false
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt.

0
Method

The HTTP method to use.

Query Parameter

A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

If true, retries on all erroneous responses regardless of type.

false
Retry Delay (ms)

The delay in milliseconds between retries.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

Input the path only (/management/accounts), The base URL is already included (https://www.googleapis.com/analytics/v3). For example, to connect to https://www.googleapis.com/analytics/v3/management/accounts, only /management/accounts is entered in this field.

/management/accounts
Use Exponential Backoff

Specifies whether to use a pre-defined exponential backoff strategy for retries.

false