Google Analytics - UA Component

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