Integrating with Google Analytics 4

Track your Fibr variations with GA4.

Fibr can send events to your Google Analytics 4 (GA4) instance whenever a visitor sees a personalized variation. This enables you to view your Fibr data along side all the other data you currently track in Google Analytics.

Deciding Your Method

Before you begin, you need to decide which tracking method you will use. If you already track your Google Analytics events through Google Tag Manager (GTM), you'll likely want to use the GTM tracking method. However, if you have Google Analytics set up directly installing gtag.js on your site and configured for your GA4 Measurement ID, you can use the gtag.js tracking method and we will automatically send events to your GA4 instance.

Make sure you use only one of the two methods. Turning on both methods may result in duplicate tracking.

Method 1: Using Google Tag Manager

If you have set up your Google Analytics with Google Tag Manager, then this is the method for you. Fibr will push a dataLayer event whenever a user views an experience. Click here to read more on turning on the GTM integration and creating the data layer.

Once you have turned on the GTM integration and a data layer has been selected follow the following steps to enable Fibr to send impression events to GA4 through GTM:

  1. After data layer creation select the GA4 option on the next screen:

  2. Select the Measurement ID for which you want to create the tag. Its preferable to select a single measurement ID even if you have multiple measurement IDs in your account.

  3. Once you select the measurement ID, we will create a new tag in your GTM with the following specifications:

    • Tag name: GA4 - Fibr Impression

    • Tag type - Google Analytics: GA4 Event

    • Measurement ID - {As specified by you}

    • Event Name: fibr_impression_event

    • Event parameters: All data layer variables

  4. Once the tag is created you can go to your GTM dashboard and submit the version with the new Fibr tag to start tracking Fibr parameters in your GA4.

Method 2: Using gtag.js

If you’ve verified that gtag.js is installed on your site and configured for GA4, you can turn on the integration within FIbr. Here are the steps you need to follow:

  1. Go to the integrations page on the Fibr dashboard and enable the Google Analytics integration

  1. Once turned on we will find the GA4 property on your website and start sending a fibr_impression_event.

Setting up Custom Dimensions

Whenever a user views an experience, we’ll send an event to GA4 called fibr_impression_event. That event will contain the following properties:

  • fibr_session_id: The unique id of a visitor session

  • fibr_user_id: The unique user id assigned to the visitor

  • fibr_variation_id: The unique id of the variation that the user saw

  • fibr_variation_name: The name of the variation that the user saw

  • fibr_campaign_group_id: The unique id of the Personalization or Experiment to which the variation belongs

  • fibr_campaign_group_type: The campaign type. This can have 2 values:

    • Personalization: This specifies that the variation loaded was of a personalization

    • Experiment: This specifies that the variation loaded was of an experiment

  • fibr_campaign_group_name: The name of the Personalization or Experiment to which the variation belongs

  • fibr_campaign_name: The name of the campaign to which the variation belongs

  • fibr_campaign_id: The unique id of the campaign to which the variation belongs

  • fibr_workflow_id: The workflow to which the campaign belongs

  • fibr_campaign_group_name: < Name of personalization or experiment >

  • fibr_client_id: This is a unique identifier for the client

  • fibr_is_qualified: This parameter is to determine whether the user qualified for a personalization or not

To effectively use Fibr events for reporting, you'll need to set up custom dimensions in GA4 to capture the parameters that are being sent over:

  1. Navigate to your Google Analytics 4 instance, click on the gear icon in the bottom left, and then click on "Custom definitions".

  2. Click on "Create custom dimension".

  3. You'll want to create a custom dimension for each of the parameters listed above. Here's an example for variation_id. The name and description can be set to what makes the most sense for your organization, but you'll want to be sure the event parameter matches the parameter noted above.

Don't be a stranger

Last updated