Integrating with Google Analytics
As a tenant administrator, perform the following steps to configure a connection with Google Analytics, verify the connection, and view the collected data in BMC Helix Operations Management.
Supported versions
BMC Helix Intelligent Integrations supports Google Analytics version 4 for data collection.
Planning for the connection
Before you configure the connection with Google Analytics, make sure that the following prerequisites are met:
- Obtain the extraction and transformation toolkit from BMC Support. This toolkit is required to extract and transform the funnel exploration report metrics into the JSON format required by BMC Helix Operations Management. The toolkit contains the following artifacts:
A Phyton script, ga4_runfunnelreport_daily.py
- ga4config.ini file
- credentials.json file
- Obtain credentials from the Google Analytics service account, and store them in a file and name the file as credentials.json.
Configuring the connection with Google Analytics
- Use the following URL to access the BMC Helix Intelligent Integrations on-premises gateway:
https://<hostName>:443/swpui
<hostName> is the name of the computer where the on-premises gateway is installed. - On the CONNECTORS tab, click
on the SOURCES panel and then click the Google Analytics tile.
Specify a unique instance name.
- Click VALIDATE AND CREATE.
The specified connection details are validated and the corresponding source connection is created in the Source Connection list. Select the source connection that you created from the list if it is not selected already.
- Make sure that the Generic Metrics option is selected.
- Expand the Generic Metrics panel.
- Click CREATE COLLECTORS to create the collector stream for the metrics data type.
Configure the distributors for the metrics data type by clicking the data type in the Distributors section and specifying the parameters for the metrics type, as explained in the following table:
Parameter nameDescriptionMax Batching SizeSpecify the maximum number of data items to send in a single POST request to the destination API.
The batch size depends on the destination’s ability to buffer the incoming data.Default: 250Max Batching DelaySpecify the maximum time (in seconds) to wait before building a batch and processing.Default: 3 secondsBase Retry DelaySpecify the initial time (in seconds) for which to wait before retrying to build a batch and processing.
The waiting time increases in the following sequence: n1, n2, n3, and so on, where n indicates the number of seconds.Default: 2 secondsExample:Base Retry Delay is set to 2 seconds.Retry is performed after 2, 4, 8, 16, ... seconds.Max Intra-Retry Delay
Specify the maximum limit for the base retry delay. Default: 60 secondsExample:Max Intra-Retry Delay is set to 60 seconds.
Base Retry Delay is set to 2 seconds.Retries are performed 2, 4, 8, 16, 32,... seconds later.Max Retry DurationSpecify the total time for retrying a delivery. For REST destinations, a delivery is a batch of data items in one POST request. Default: 5 minutesExample:Max Retry Duration is set to 8 hours.
Base Retry Delay is set to 2 seconds.Requests are sent for 2+4+8+16+32+64+132... until 8 hours in total duration is reached. After that, no subsequent attempts are made to retry the delivery.The assumption here is that if there is an outage or other issue with the destination tool, recovery should take less than the value of the Max Retry Duration parameter to be completed.Attributes To Be Dropped When Updating EventsSpecify the event attributes that you do not want to be updated in BMC Helix Operations Managementwhen events are updated. For example, if you do not want an event's severity, source address, source category, and subcategory to be updated in BMC Helix Operations Management , you need to specify those attributes in a comma-separated format: severity,source_address,source_category,source_subcategory .Important:You can obtain the event attribute names in BMC Helix Operations Management, by exporting any event data in JSON, BAROC, XML, or CSV format . The exported file contains all attributes of the event data, and from there you can identify the attributes to be dropped.- Click CREATE DISTRIBUTORS to create the distributor stream for the metrics data type.
- Click VALIDATE AND CREATE and then click SAVE STREAM to save the stream.
After you save the stream, the connection that you just created appears on the SOURCES panel.
- On the SOURCES panel, click Configure Mediator
for the source connection that you created and then expand Generic Metrics.
- Copy the URL and configure the toolkit to forward metrics:
- Click copy
to copy the auto generated Generic collector URL and save the URL in a temporary file.
For example, http://dev-pun-domqa:7457/hii/api/mediator/v3/push/c089-befr-4170-977d-aa9b0a544c - Configure the extraction and transformation toolkit to forward metrics data to BMC Helix Intelligent Integrations and BMC Helix Operations Management.
- Click copy
- On the SOURCES panel, move the slider to the right to start the data stream for the connection that you created in step 11.
Configuring the toolkit for forwarding metrics data to BMC Helix Intelligent Integrations and BMC Helix Operations Management
- Create a temporary directory on the computer where the BMC Helix Intelligent Integrations on-premises gateway is installed. For example, C:/connectors/GA4.
- Extract the toolkit to the C:/connectors/GA4 directory.
- Replace the credentials.json file in the GA4 directory with credentials.json of the Google Analytics service account.
- Open the ga4config.ini file with a text editor.
- In the [GA_Auth] section, update the key_file_path parameter with the path of the credentials.json file of the Google Analytics service account.
- In the [FunnelReport] section, update the property_id parameter with the ID of the Google Analytics 4 property.
- In the [GA_Connector] section, update the generic_connector_metric_url parameter with the Generic Collector URL that you have copied to a temporary file.
- Save the file.
- Run the ga4_runfunnelreport_daily.py Python script.
Verifying the connection
In BMC Helix Intelligent Integrations , on the SOURCES panel, confirm that the data stream for the connection you created is running.
A moving red arrow ( ) indicates that the metrics stream is running.
Viewing data in BMC Helix Operations Management
You can view metric data for the following parameters of a funnel exploration report in BMC Helix Operations Management:
- Active users
- Completion rate
- Abandonments
- Abandonment rate
To view metric data in BMC Helix Operations Management
- In BMC Helix Operations Management, select Monitoring > Devices.
- Click the links for the required device.
- On the Monitors tab, click the required monitor.
The Performance Overview tab shows the metrics graph.
The following figures show the funnel exploration report for an application, Retail_Outlet in the Google Analytics UI and the metric graph in the Performance Overview tab of BMC Helix Operations Management.
For information about metrics, see Viewing collected data.