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 in Prismatic. 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
Input | Default | Notes |
---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent | The OAuth 2.0 Authorization URL for Google Calendar |
Client ID string / Required clientId | Provide a string value for the client Id of your OAuth 2.0 application. | |
Client Secret password / Required clientSecret | Provide a string value for the client secret of your OAuth 2.0 application. | |
Scopes string / Required scopes | 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 | A space-delimited set of one or more scopes to get the user's permission to access. |
Token URL string / Required Hidden Field tokenUrl | https://oauth2.googleapis.com/token | The OAuth 2.0 Token URL for Google Analytics |
Data Sources
Account Names
A picklist of account names | key: accountNames | type: picklist
Input | Notes |
---|---|
Connection connection / Required connection |
Custom Metrics
A picklist of Custom Metrics | key: getCustomMetric | type: picklist
Input | Notes | Example |
---|---|---|
Account ID string / Required accountId | 37746615 | |
Connection connection / Required connection | ||
Web Property ID string / Required webPropertyId | UA-12345678-1 |
Views (Profiles)
A picklist of views (profiles) | key: profiles | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | ~all | 37746615 | |
Connection connection / Required connection | |||
Web Property ID string / Required webPropertyId | ~all |
Web Property
A picklist of Web Properties | key: getWebProperty | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | ~all | 37746615 | |
Connection connection / Required connection |
Actions
Get Custom Dimension
Get a Custom Dimensions | key: getCustomDimension
Input | Notes | Example |
---|---|---|
Account ID string / Required accountId | 37746615 | |
Connection connection / Required connection | ||
Custom Dimension ID string / Required customDimensionId | ||
Web Property ID string / Required webPropertyId | UA-12345678-1 |
Get Custom Metric
Get a Custom Metric | key: getCustomMetric
Input | Notes | Example |
---|---|---|
Account ID string / Required accountId | 37746615 | |
Connection connection / Required connection | ||
Custom Metric ID string / Required customMetricId | ||
Web Property ID string / Required webPropertyId | UA-12345678-1 |
Get Profile
Get a Google Analytics Profile | key: getProfile
Input | Notes | Example |
---|---|---|
Account ID string / Required accountId | 37746615 | |
Connection connection / Required connection | ||
Profile ID string / Required profileId | ||
Web Property ID string / Required webPropertyId |
Get View Data
Get Analytics data for a View (profile) | key: getData
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Additional Dimensions string customDimensions | Must be a comma seperated list of dimensions i.e. 'ga:browser,ga:city' | ||
Additional Metrics string customMetrics | Must be a comma seperated list of metrics i.e. 'ga:sesions,ga:pageviews' | ||
Standard Dimensions string Value List dimensions | ga:browser | ||
End Date string / Required endDate | 2022-02-02 | ||
Filters string Value List filters | |||
Profile ID string / Required ids | 840123345 | ||
Include Empty Rows boolean includeEmpty | |||
Items Per Page string / Required itemsPerPage | 1000 | ||
Standard Metrics string Value List metrics | ga:pageviews | ||
Analytics Segment string segment | |||
Start Date string / Required startDate | 2022-02-01 | ||
Start Index string / Required startIndex | 1 |
Get Web Property
Get Web Property | key: getWebProperty
Input | Notes | Example |
---|---|---|
Account ID string / Required accountId | 37746615 | |
Connection connection / Required connection | ||
Web Property ID string / Required webPropertyId | UA-12345678-1 |
Link User to Account
Link a User by email to specified Account | key: addUser
Input | Notes |
---|---|
Account ID string / Required accountId | |
Connection connection / Required connection | |
Email string / Required email |
List Accounts
Paginated listing of Accounts | key: listAccounts
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Items Per Page string / Required itemsPerPage | 1000 | |
Start Index string / Required startIndex | 1 |
List Custom Dimensions
List Custom Dimensions for the given Web Property | key: listCustomDimensions
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | 37746615 | ||
Connection connection / Required connection | |||
Items Per Page string / Required itemsPerPage | 1000 | ||
Start Index string / Required startIndex | 1 | ||
Web Property ID string / Required webPropertyId | UA-12345678-1 |
List Custom Metrics
List Custom Metrics for the given Web Property | key: listCustomMetrics
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | 37746615 | ||
Connection connection / Required connection | |||
Items Per Page string / Required itemsPerPage | 1000 | ||
Start Index string / Required startIndex | 1 | ||
Web Property ID string / Required webPropertyId | UA-12345678-1 |
List Profiles
List Profiles associated with the specified Account ID | key: listProfiles
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | ~all | 37746615 | |
Connection connection / Required connection | |||
Items Per Page string / Required itemsPerPage | 1000 | ||
Start Index string / Required startIndex | 1 | ||
Web Property ID string / Required webPropertyId | ~all |
List Web Properties
List Web Properties associated with the specified Account ID | key: listWebProperties
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | 37746615 | ||
Connection connection / Required connection | |||
Items Per Page string / Required itemsPerPage | 1000 | ||
Start Index string / Required startIndex | 1 |
Raw Request
Send raw HTTP request to Google Analytics | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | 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 string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required 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 boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. |