TIBCO Scribe® Online Connector For Google Analytics
The TIBCO Cloud™ Integration - Connect Connector for Google Analytics is based on the CData driver for Google Analytics. This Connector provides access to data about your websites. Get statistics on visitors, traffic, goal completions, and more. Merge Google Analytics data with data from other sources in a database or send goal completions to your CRM system to better understand your customers.
Use Google Analytics Connector as a source Connection for On schedule and On event apps. This Connector is based on the Scribe.Connector.AdoNet library and CData Google Analytics ADO.NET Provider.
Connector Specifications
This Connector supports version 3 of the Google Analytics API.
Supported | |
---|---|
Agent Types |
|
Connect on-premise | X |
Connect cloud | |
Data Replication Apps |
|
Source | |
Target | |
On Schedule Apps |
|
Source | X |
Target | |
On Event Apps |
|
Source | X |
Target | X |
Flows |
|
Integration | X |
Request-Reply | X |
Message |
Supported Entities
The Google Analytics Connector supports the following entities. Click a linked entity name for additional information when using that entity in TIBCO Cloud™ Integration - Connect.
Google Analytics entities are separated into two categories, account and profile information, and combinations of metrics and dimensions. Tables in most Google Analytics reports organize dimension values into rows and metrics into columns.
- Account and profile information follows a traditional table format.
- Dimensions are data attributes. For example, the dimension City indicates the City from which a session originates, such as Paris or New York. The dimension Page indicates the URL of a page that is viewed.
- Metrics are quantitative measurements. The metric Sessions is the total number of sessions. The metric Pages/Session is the average number of pages viewed per session. Not all dimensions and metrics can be queried together. For valid combinations of metrics and dimensions, see Dimension & Metrics Explorer in the Google Analytics developer guides.
Standard Operations
Entity | Query | Create | Update | Delete | Upsert |
---|---|---|---|---|---|
Account And Profile |
|||||
Accounts |
X |
|
|
|
|
Profiles |
X |
|
|
|
|
Segments |
X |
|
|
|
|
WebProperties |
X |
|
|
|
|
Metrics And Dimensions |
|||||
X |
|
|
|
|
|
AdWords |
X |
|
|
|
|
Ecommerce |
X |
|
|
|
|
GoalCompletions |
X |
|
|
|
|
SiteContent |
X |
|
|
|
|
SiteSearch |
X |
|
|
|
|
SiteSpeed |
X |
|
|
|
|
Traffic |
X |
|
|
|
|
Setup Considerations
To use the Google Analytics Connector you must have the following configured in the Google Developer Console:
- Google Analytics API must be enabled. In the Google Developer Console Help, see Enabling and Disabling the API for step-by-step instructions.
- Create a Google Service Account, and create and download the public/private key as a standard P12 file. In the Google Developer Console Help, see Setting up OAuth 2.0.
- Your Google Service Account role should be set to Project > Viewer.
- Make note of the Service Account ID. This is required when configuring the Connection to Google Analytics. It is similar to: scribe-docs@scribedocumentation-197314.iam.gserviceaccount.com
- Install the P12 certificate file in the Connect on-premise agent folder for any agent where the Google Analytics Connector is installed. Typically the agent is installed in: C:\Program Files (x86)\Scribe Software\TIBCO Scribe® Online Agent\
- In Google Analytics, create a new user to represent your Google Developer Service account. Provide access to the Google Analytics Account, Property, and View that should be accessible by the Google Analytics Connector. Use your Service Account ID as the email for this new user.
- To query AdSense you must link your AdSense account to your Google Analytics account. See Creating an AdSense account and Link Analytics and AdSense in the Google documentation.
Advanced considerations, such as customizing the SSL configuration, or connecting through a firewall or a proxy, are described in the Advanced Settings section of the CData documentation.
API Usage Limits
Google Analytics limits the number of API calls per project per day and the number of queries per second per IP address. Refer to Limits and Quotas on API Requests in the Google Analytics Developer Guides for exact limits.
Selecting An Agent Type For Google Analytics
Refer to TIBCO Cloud™ Integration - Connect Agents for information on available agent types and how to select the best agent for your app.
Connecting To Google Analytics
- Select Connections from the menu.
- From the Connections page select Create
to open the Create a connection dialog.
- Select the Connector from
the list to open the Connection dialog, and then enter the following information for this Connection:
- Name — This can be any meaningful name, up to 25 characters.
- Alias — An alias for this Connection name. The alias is generated from the Connection name, and can be up to 25 characters. The Connection alias can include letters, numbers, and underscores. Spaces and special characters are not accepted. You can change the alias. For more information, see Connection Alias.
- OAuthJWTCert — Path to the P12 certificate file stored in the agent folder. Note that double backslashes are required.
Example: C:\\Program Files (x86)\\Scribe Software\\TIBCO Scribe® Online Agent\\ScribeDocumentation-a4741c20f334.p12
- OAuthJWTCertPassword — Password provided by the Google Developers Console when you downloaded the certificate.
- OAuthJWTIssuer — Service account ID of the account that has access to your Google Analytics account.
Example: scribe-docs@scribedocumentation-197314.iam.gserviceaccount.com
- OAuthJWTSubject — Email address of the service account.
Example: scribe-docs@scribedocumentation-197314.iam.gserviceaccount.com
- Profile — Optional. Set this to the Google Analytics profile or view to which you want to connect.
- Additional Parameters — Optional field where you can specify one or more connection string parameters. See the Connection String Options section of the CData documentation for a list of parameters that can be used and their default values. Note that in some cases the CData Google Analytics ADO.NET Provider does not fully support all of the possible parameters.
Syntax for the Additional Parameters field is as follows:
- All blank characters, except those within a value or within quotation marks, are ignored
- Preceding and trailing spaces are ignored unless enclosed in single or double quotes, such as Keyword=" value"
- Semicolons (;) within a value must be delimited by quotation marks
- Use a single quote (') if the value begins with a double quote (")
- Use a double quote (") if the value begins with a single quote (')
- Parameters are case-insensitive
- If a KEYWORD=VALUE pair occurs more than once in the connection string, the value associated with the last occurrence is used
- If a keyword contains an equal sign (=), it must be preceded by an additional equal sign to indicate that the equal sign is part of the keyword
- Parameters that are handled by other fields or default settings in the Connection dialog are ignored if used in the Additional Parameters field, including:
- OAuthJWTCert
- OAuthJWTCertPassword
- OAuthJWTIssuer
- OAuthJWTSubject
- Profile
- Logfile — This parameter is not visible in the Connection dialog, but is set by the Connector. The default size is a maximum of 10MB. Any CData log files generated by this setting are stored in the default Connect on-premise agent Logs directory, C:\Program Files (x86)\Scribe Software\TIBCO Scribe® Online Agent\logs\. The format for log file names for CData logs are as follows: <ConnectorName><GUID of the Connection><DateTimeStamp>.log
- MaxLogFileSize — This parameter is set by the Connector to a maximum of 10MB.
- Other
- RTK
- UseConnectionPooling
- Select Test to ensure that the agent can connect to your database. Be sure to test the Connection against all agents that use this Connection. See Testing Connections.
- Select OK/Save to save the Connection.
Metadata Notes
Consider the following for Google Analytics data fields and entity types.
Naming
Connection metadata must have unique entity, relationship, and field names. If your Connection metadata has duplicate names, review the source system to determine if the duplicates can be renamed.
Google Analytics Connector As An App Source
Consider the following when using the Google Analytics Connector as an app source.
- Hierarchical data is not supported.
- Relationships are not supported.
- Using Net Change to filter for new and updated records is not supported.
Query
Google Analytics only allows up to ten Metrics and seven Dimensions in a single query. Therefore, when issuing a query that selects all columns, only the default Metric columns are selected for tables with more than ten Metrics. The default Dimensions are used unless you explicitly select other dimension columns.
Native Query
The Google Analytics Connector supports SQL queries in Native Query Blocks to create customized queries for Google Analytics. The query can be as simple or complex as you need it to be; however, it should return a single result set. The native query text is sent to Google Analytics exactly as it is entered without any modifications.
GroupBy and Aggregated functions are not supported for Native Query.
After entering the SQL query, you must select Test to validate the query. Invalid queries are not accepted by the Connector. See Native Query Block and Creating Native Queries For Microsoft SQL Server for additional information.
When testing a Native Query in a flow, if the source datastore does not return any data, TIBCO Cloud™ Integration - Connect cannot build the schema for the underlying metadata and the flow cannot be saved. To allow TIBCO Cloud™ Integration - Connect to build the schema, do the following:
- Create a single temporary record in the source datastore that matches the Native Query.
- Test the Native Query and ensure that it is successful.
- Save the flow.
- Remove the temporary record from the source datastore.
Filtering
Filtering support varies by entity. For additional details, see the Data Model section of the CData documentation .
- Most Date or Time related fields support string input either as a date string or a relative date, such as today, yesterday, or #daysAgo. For more information see the Dimensions & Metrics Explorer in the Google Analytics API documentation
- The other Date or Time related fields support values according to the. The best way to see the whole list is visit Dimensions & Metrics Explorer
Notes On Standard Entities
AdSense
- Query — To query AdSense you must link your AdSense account to your Google Analytics account. See Creating an AdSense account and Link Analytics and AdSense in the Google documentation. If you try to query AdSense without linking your accounts an error similar to the following is generated when you try to Preview in the Query Block:
Could not execute the specified command: Restricted metric(s): ga:adsenseadsclicks, ga:adsensepageimpressions, ga:adsenserevenue can only be queried under certain conditions.
TIBCO Cloud™ Integration - Connect API Considerations
To create connections with the Google Analytics API, the Google Analytics Connector requires the following information:
Connector Name |
Google Analytics |
Connector ID |
F3576DD7-5873-43CA-AD7D-82FA66BEC24F |
TIBCO Cloud™ Integration - Connect Connection Properties
In addition, this Connector uses the Connection properties shown in the following table.
Name | Data Type | Required | Secured | Usage |
---|---|---|---|---|
OAuthJWTCert |
string |
Yes |
No |
|
OAuthJWTCertPassword |
string |
Yes |
Yes |
|
OAuthJWTIssuer |
string |
No |
No |
|
OAuthJWTSubject |
string |
Yes |
No |
|
Profile |
string |
No |
No |
|
ConnectionString |
string |
No |
No |
|
License Agreement
The TIBCO End User License Agreement for the Google Analytics Connector describes TIBCO and your legal obligations and requirements. TIBCO suggests that you read the End User License Agreement.
More Information
For additional information on this Connector, refer to the Knowledge Base and Discussions in the TIBCO Community.