# Integrate Google Analytics (GA4)

This guide will help you integrate Google Analytics 4 (GA4) with Fibr so that Fibr can send events to your Google Analytics 4 (GA4) instance whenever a visitor sees a personalized variation. This lets you view your Fibr data alongside all the other data you track in Google Analytics.

{% embed url="<https://youtu.be/bw121b4rf84?si=HkgNCpqmao6G1_D->" %}

**Step 1:** Click on **Settings** on the Fibr dashboard&#x20;

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2F5mbNrfSIMVFZx1qGt70a%2Fimage.png?alt=media&#x26;token=f96dea36-ea9e-4a32-ad2e-cbff9314b5be" alt="" width="563"><figcaption></figcaption></figure>

**Step 2:** Navigate on **Integrations.**

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2F0VW2CEIfifRxM3m7Q1dn%2Fimage.png?alt=media&#x26;token=f74f6adb-3b05-4162-8a69-c5a1a2fcfea6" alt="" width="563"><figcaption></figcaption></figure>

**Step 3:** Click on Connect to integrate GA4 to Fibr Dashboard.

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2FUjtf53sIer9xklYCAsYy%2Fimage.png?alt=media&#x26;token=2084d6ea-093f-49c1-93d1-7a4f33f30380" alt="" width="563"><figcaption></figcaption></figure>

**Step 4:** Sign up to your Google Account connected to Google Analytics(GA4)  and allow access when prompted.

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2FipBM5rLRUkKZUeNkPl71%2FUntitled%20design%20(2).png?alt=media&#x26;token=57e3ed1c-11d2-4c27-b36a-e8cd5c679823" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
This method uses **OAuth 2.0 Authorization Code Flow**, a secure industry-standard process. This process is secure, fully compliant with Google’s API policies, and does not expose your credentials to Fibr.
{% endhint %}

**Step 5:** Select the Account, Property and Measurement ID.&#x20;

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2Fp8fLci5dCYwOAPmr4WzC%2Fimage.png?alt=media&#x26;token=397b65c1-35d0-490c-b9b4-f665b478e3ca" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2FVnNs5KHKCTZCNcRxAGjP%2Fimage.png?alt=media&#x26;token=c63f4309-e900-43d2-8212-ebdebfd1fd76" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://3335504681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80aS5Lqrk8qDoq5OTbgm%2Fuploads%2FgjYZ4sVW9lHFHB2YJrPs%2Fimage.png?alt=media&#x26;token=541d7e7e-0807-4d22-bb0e-01c9ee559a4c" alt="" width="563"><figcaption></figcaption></figure>

Once connected, Fibr starts sending a `fibr_impression_event`.&#x20;

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

* `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&#x20;
* `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&#x20;
* `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
