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 applicationType of data collected or viewedBenefits

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. Open link

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.

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, 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:
    http://<hostName>:<portNumber>/swpui
  2. On the CONNECTORS tab, clickon 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 nameDescription

    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 seconds

    Example:

    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 seconds

    Example:

    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 minutes

    Example:

    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.

    JSLT Mapping

    Remove {*:.} and add only a period (.).


  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.
  12. On the SOURCES panel, click Configure Mediator for the source connection that you created and then expand Generic Metrics.
  13. Copy the URL and configure the toolkit to forward metrics:
    1. 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.

    2. Configure the extraction and transformation toolkit to forward metrics data to BMC Helix Intelligent Integrations and BMC Helix Operations Management.

  14. On the SOURCES panel, move the slider to the right to start the data stream for the connector you created in step 8.

    Important

    For 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.


To configure the extraction and transformation 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 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.

A moving red arrow () 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.
    The following images 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. Open link


Was this page helpful? Yes No Submitting... Thank you

Comments