Integrating with Google Analytics


Google Analytics is a platform that collects data from your websites and apps to create reports that provide insights into your business. The funnel exploration feature provided by Google Analytics lets you visualize the steps that 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 for 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 system health.

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 version

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. It 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 you want to.

    • ga4config.ini file 
    • credentials.json file 
  • Obtain credentials from the Google Analytics service account and store them in a file named 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>:<portNumber>/swpui
  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:

  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 connector that you just created is listed 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 connector you created in step 8.
    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 extraction and transformation toolkit to forward 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 extraction and transformation toolkit to the GA4 directory.
  3. Replace the credentials.json file in the GA4 directory with the credentials.json file in which you have stored the credentials 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 for 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 in 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 metric 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 link for the required device.
  3. On the Monitors tab, click the required monitor.
    The Performance Overview tab shows the metrics graph for the funnel exploration report for the Retail_Outlet application.
    BHOM_GA_Metrics24102.png
    The following figure shows the funnel exploration report for the Retail_Outlet application in the Google Analytics UI. 
    Metrics_GA24102.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*