Integrating with Google Analytics


Google Analytics is a platform that collects data from your websites and applications to create reports that provide insights into your business. The funnel exploration feature provided by Google Analytics helps you visualize the steps that the business users take to complete a task and quickly see how well they are succeeding or failing at each step.

Configure a connection with Google Analytics to view metric data of a funnel exploration report from Google Analytics in BMC Helix Operations Management and to monitor the system health.

BMC Helix application

Type of data collected or viewed

Benefits

BMC Helix Operations Management

Metrics

Use alarm and variate policies to detect anomalies and eliminate false positives for more accurate results while monitoring the health of your system.

For more information, see Detecting anomalies by using static and dynamic thresholds.

Important

This connector is available only for an on-premises deployment of BMC Helix Intelligent Integrations.


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.

Connector steps.png

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

      Important

      The toolkit provided by BMC is coded in Python. However, you can create your own toolkit in any other programming language.

    • 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

  1. 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.
  2. On the CONNECTORS tab, clickadd_icon.pngon the SOURCES panel and then click the Google Analytics tile.
  3. Specify a unique instance name.

    Best practice

    We recommend that you specify the instance name in the following format:

    <sourceType>_<sourceControllerServerName>_<InstanceQualifier>

    The instance qualifier helps you to distinguish the multiple instances configured from the same source server. For example, you can name your instances as GA_Host_PROD, GA_Host_TEST, and so on.


  4. Click VALIDATE AND CREATE.
    The specified connection details are validated and the corresponding source connection is created in the Source Connection list.
  5. Select the source connection that you created from the list if it is not selected already.

    Important

    The destination host connection is created and configured automatically when the source connection is created.

  6. Make sure that the Generic Metrics option is selected.
  7. Expand the Generic Metrics panel.
  8. Click CREATE COLLECTORS to create the collector stream for the metrics data type.
  9. 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 name
    Description
    Max Batching Size
    Specify 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: 250
    Max Batching Delay
    Specify the maximum time (in seconds) to wait before building a batch and processing.Default: 3 seconds 
    Base Retry Delay
    Specify 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 Duration
    Specify 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 Events
    Specify 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. 

  10. Click CREATE DISTRIBUTORS to create the distributor stream for the metrics data type.
  11. 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.
  1. On the SOURCES panel, click Configure Mediator ConfigureMediator_icon.pngfor the source connection that you created and then expand Generic Metrics.
  2. Copy the URL and configure the toolkit to forward metrics:
    1. Click copy copy_URL.pngto 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
    2. Configure the extraction and transformation toolkit to forward metrics data to BMC Helix Intelligent Integrations and BMC Helix Operations Management.
  3. On the SOURCES panel, move the slider to the right to start the data stream for the connection that you created in step 11.
    ImportantFor a data stream, the Run Latency (max/avg), Items (Avg per Run), and Last Run Status columns on the Streams page might show No Runs as the status during the data collection process. After the completion of the process, these columns are updated with an appropriate status.

Configuring the toolkit for forwarding metrics data to BMC Helix Intelligent Integrations and BMC Helix Operations Management

  1. Create a temporary directory on the computer where the BMC Helix Intelligent Integrations on-premises gateway is installed. For example, C:/connectors/GA4.
  2. Extract the toolkit to the C:/connectors/GA4 directory.
  3. Replace the credentials.json file in the GA4 directory with credentials.json of the Google Analytics service account.
  4. Open the ga4config.ini file with a text editor.
  5. 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.
  6. In the [FunnelReport] section, update the property_id parameter with the ID of the Google Analytics 4 property.
  7. 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.
  8. Save the file.
  9. 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.

GA_MetricsStream_24102.png

A moving red arrow ( MetricsStream_Icon.png) 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

  1. In BMC Helix Operations Management, select Monitoring > Devices.
  2. Click the links for the required device.
  3. 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. 
    Metrics_GA24102.png

    BHOM_GA_Metrics24102.png

For information about metrics, see Viewing collected data.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*