# Connect AdLibertas to Firebase

![](https://www.adlibertas.com/wp-content/uploads/2021/06/iSFBst.png)

### Step 1: Link Google BigQuery to Firebase <a href="#h-step-1-link-google-bigquery-to-firebase" id="h-step-1-link-google-bigquery-to-firebase"></a>

Firebase by itself doesn’t allow access to individual events. To enable AdLibertas Audience Reporting to access your Firebase data you’ll need to first [link a Firebase project to BigQuery](https://support.google.com/firebase/answer/6318765?hl=en\&ref_topic=6317497) (google documentation)

{% hint style="info" %}
**Data Sampling on Spark: inaccuracies on the free plan**

Google BigQuery is available for all Firebase projects. **For Firebase projects that stay on the Spark plan, the raw event data exported to BigQuery is sampled and only represents \~10% of the actual events on the free plan.** To export all events you’ll need to upgrade to the [Blaze Plan.](https://firebase.google.com/docs/projects/billing/firebase-pricing-plans)
{% endhint %}

* You’ll need Firebase owner privileges to enable this feature
* Be sure to include advertising identifiers.
* We recommend daily exports, to [<mark style="color:blue;">minimize your costs</mark>](https://docs.adlibertas.com/data-integrations/analytics-connections/firebase-best-practices-keeping-google-bigquery-costs-down)<mark style="color:blue;">.</mark>

{% hint style="info" %}
Note: Today we only export Google Analytics, so you don’t need to enable Crashlytics / / etc. **But you will** want to export *Include advertising identifiers in export* for maximum user granularity.&#x20;

It takes up to 24 hours for the dataset to be created and for event collection to begin.
{% endhint %}

### Step 2: Add AdLibertas as a viewer to your Firebase Project <a href="#h-step-2-enable-adlibertas-access" id="h-step-2-enable-adlibertas-access"></a>

Next, you'll want to invite an AdLibertas-enabled Firebase user to your project(s). In addition to your data export, this will enable us to pull Experiment names directly from your AB tests running in Firebase.

Add <`yourcompanyname>@adlibertas.com` to your Firebase project with **Viewer** role.

![](https://2la1xp2tiyea46tdsj1ai1pe-wpengine.netdna-ssl.com/wp-content/uploads/2020/06/firebase.png)

![](https://336314087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaO8orL32xNzJW4MhnNef%2Fuploads%2FS6Cvtl0iy1dkuh7SU28D%2Fimage.png?alt=media\&token=c10d179a-80c7-4799-bd09-c8fbe773d861)

{% hint style="info" %}
You’ll need to have owner privileges to add members to your Firebase account.
{% endhint %}

1.[ Sign in](https://console.firebase.google.com/) to Firebase.\
2\. Select the project associated with the app you want to share access\
3\. Click,<img src="https://2la1xp2tiyea46tdsj1ai1pe-wpengine.netdna-ssl.com/wp-content/uploads/2020/06/cog.png" alt="" data-size="line"> then select **Users and permissions.**\
4\. On the Permissions page, click **Add member.**\
5\. In the user dialog, enter [myCompanyName@adlibertas.com](mailto:myCompanyName@reporting.adlibertas.com)\
6\. Select **Viewer** as role.

Related: [Firebase Reporting Details](https://docs.adlibertas.com/data-integrations/analytics/setting-user-campaigns-in-firebase)
