# Google Analytics

## ![](https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2Fihx7iGuwdk4DSRmSlNJZ%2Fgoogle-analytics.png?alt=media\&token=88858373-20f9-4715-b2f6-f14098a1886e)

## Set up

### Navigate to the Integration settings view

1. Select an app in the top left corner from the Switcher
2. Navigate to **App Settings** by clicking the gear icon (⚙️) at the top of the Timeline sidebar
3. Click on **Integrations** in the sidebar

### **Connect Google Analytics**

1. Find the **Google Analytics** integration module under the **Observability & analytics** section
2. Click the **Connect** button
3. Enter the **Property ID** for your Google Analytics configuration and upload a **Service Account key .json** file corresponding to a service account that's properly configured to access Google Analytics.&#x20;

#### Configuring API access with your service account

When configuring a service account to access Google Analytics data, there are a few steps to take note of:

1. The service account can be set up with the **Service Account User** role.
2. The Google Cloud project your service account is part of must have the **Google Analytics Admin API** (required to fetch data streams) and **Google Analytics Data API** (required to fetch event data) enabled. You can enable these APIs from your Google Cloud project by going to **APIs & Services > Enable APIs & Services** and searching for the corresponding APIs.
3. The service account's email address must be added to your Google Analytics account. You can do this by going to **Admin > Account Access Management > Add access permissions to new users (+ button)** and then adding the service account's email address with the **Viewer** role.

### **Configure the Google Analytics integration**

1. Select a **Data Stream ID** from the list of available data streams associated with your Google Analytics property.
2. Select events from your Google Analytics account and property to monitor from Runway. Additionally, you can specify event metrics (e.g. `checkouts`) to track metric-specific metrics such as averages, medians, and percentiles.

{% hint style="info" %}
The events you select as part of the integration setup will be surfaced in the [**Rollout**](https://docs.runway.team/using-runway/rollout) view of each release. You can also configure [health metrics](https://docs.runway.team/using-runway/app-settings/health-metrics-settings) that define acceptable thresholds for any of these events, associate metrics with [rollout automations](https://docs.runway.team/automations/types-of-automations#halt-unstable-phased-releases) and more!
{% endhint %}

{% hint style="info" %}
When selected events include an associated metric, Runway will compute additional metrics automatically, such as Average value, Median value, and Percentile metrics. For more information on Google Analytics metrics including default metrics collected, visit their [documentation](https://support.google.com/analytics/answer/9143382?sjid=13337896232584150355-NA#advertising-metrics\&ecommerce-metrics\&event-metrics\&other-metrics\&page-screen-metrics\&predictive-metrics\&publisher-metrics\&revenue-metrics\&session-metrics\&user-metrics\&user-lifetime-metrics). Reminder that custom metrics must be added to your account and property in Google Analytics before they can be queried. For more information on custom metrics, go [here](https://support.google.com/analytics/answer/10075209#zippy=%2Ccreate-a-custom-metric).
{% endhint %}

For a complete list of available metric types that Runway generates from your selected events, visit the [Metric Types documentation](https://docs.runway.team/using-runway/app-settings/health-metrics-settings#metric-types).
