How to use IBM® App Connect with Google Analytics

Google Analytics is a web analytics service that tracks and reports website traffic to provide insights into user behavior and engagement. It helps businesses optimize their online presence and marketing strategies.

Availability:
  • A connector in IBM App Connect Enterprise as a ServiceApp Connect Enterprise as a Service connector
  • A local connector in a Designer instance of IBM App Connect in containers (Support Cycle 3)Local connector in containers (Long Term Support Cycle-3 release) 13.0.7.0-r1 or later

Supported product and API versions

To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.

Connecting to Google Analytics

Complete the connection fields that you see in the App Connect Designer Connect > Applications and APIs page or flow editor. If necessary, work with your Google Analytics administrator to obtain these values.

Google Analytics connection fields:
Account name
Provide a meaningful name to your account that helps you to identify it.
Application client ID: The unique ID that identifies your application when it requests access to Google data and APIs.
Application client secret: The secret key that authenticates your application when it requests access to Google data and APIs.
Access token: A temporary key that lets the application securely access your data or specific features. This is generated from the application client ID and client secret.
Refresh token: The refresh token used to get a new access token when the current one expires. This is generated from the application client ID and client secret.

To obtain the connection values for Google Analytics, see Obtaining connection values for Google Analytics.

To connect to a Google Analytics endpoint from the App Connect Designer Applications and APIs page for the first time, expand Google Analytics, then click Connect.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.

General Considerations

Before you use App Connect Designer with Google Analytics, take note of the following considerations:

  • You can see lists of the trigger events and actions that are available on the Applications and APIs page of the App Connect Designer.

    For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Events and Actions

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

Google Analytics actions

Your flow completes these actions on this application.

Object Action Description Connector API documentation link
Account summaries Retrieve account summaries Retrieves summaries of all accounts accessible by the user https://developers.google.com/analytics/reference
Accounts Retrieve accounts Retrieves accounts accessible by the user
Custom dimensions Retrieve custom dimensions Retrieves custom dimensions for a property
Custom metrics Retrieve custom metrics Retrieves custom metrics for a property
Data streams Retrieve data streams Retrieves data streams for a property
Key events Retrieve key events Retrieves key events for a property
Properties Retrieve properties Retrieves properties under the specified account
Reports Retrieve reports Retrieves reporting data for the given Google Analytics property

Model Context Protocol (MCP) support

The Google Analytics connector supports MCP, and all Google Analytics actions for the listed objects can be added to an MCP server as tools. For more information on how to configure an MCP server, see Creating and managing MCP servers.