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.

Google Analytics - UA 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
InputDefaultNotes
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 Names#

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

InputNotes
Input
Connection
connection
/ Required
connection
Notes
 

Custom Metrics#

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

InputNotesExample
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

InputDefaultNotesExample
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 Property#

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

InputDefaultNotesExample
Input
Account ID
string
/ Required
accountId
Default
~all
Notes
 
Example
37746615
Input
Connection
connection
/ Required
connection
Default
 
Notes
 
Example
 

Actions#

Get Custom Dimension#

Get a Custom Dimensions | key: getCustomDimension

InputNotesExample
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 Metric#

Get a Custom Metric | key: getCustomMetric

InputNotesExample
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 Profile#

Get a Google Analytics Profile | key: getProfile

InputNotesExample
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 Data#

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

InputDefaultNotesExample
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 Property#

Get Web Property | key: getWebProperty

InputNotesExample
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 Account#

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

InputNotes
Input
Account ID
string
/ Required
accountId
Notes
 
Input
Connection
connection
/ Required
connection
Notes
 
Input
Email
string
/ Required
email
Notes
 

List Accounts#

Paginated listing of Accounts | key: listAccounts

InputDefaultNotes
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 Dimensions#

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

InputDefaultNotesExample
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 Metrics#

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

InputDefaultNotesExample
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 Profiles#

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

InputDefaultNotesExample
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 Properties#

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

InputDefaultNotesExample
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 Request#

Issue a raw HTTP request | key: rawRequest

InputDefaultNotesExample
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