> ## Documentation Index
> Fetch the complete documentation index at: https://help.dash.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Share your GA4 click records

> Share Meta ad click URLs and timestamps from your Google Analytics 4 BigQuery export: invite us read-only, or run one query and send a CSV.

Google Analytics 4 keeps every landing URL, `fbclid` included, in its BigQuery export. This is the fastest way to give AI Ads Audit your [Meta click history](https://help.dash.fi/integrations/ad-pay-protection/share-click-history.md).

> [!NOTE]
>
> GA4 doesn't store visitor IPs. Add them from another tool if you can: see [visitor IPs from other tools](https://help.dash.fi/integrations/ad-pay-protection/click-history-other-tools.md).

***

## Share the records

Your BigQuery dataset is named `analytics_` plus your GA4 property ID. Find both in GA4 under **Admin > Product links > BigQuery links** (project ID) and **Admin > Property details** (property ID).

**Invite us (recommended)**

We run the queries and the download from our own Google Cloud account, so this adds nothing to your bill.

**1. Open the dataset**

Go to [console.cloud.google.com/bigquery](https://console.cloud.google.com/bigquery), pick your project and select the dataset `analytics_PROPERTY_ID`.

**2. Add us as a viewer**

Click **Sharing > Permissions > Add principal**. Under **New principals**, enter the Google account your Dash.fi contact sends you. Role: **BigQuery Data Viewer**. Click **Save**.

**3. Tell your Dash.fi contact**

Reply with your project ID and property ID.

> [!WARNING]
>
> If your organization only allows Google accounts from its own domain, the invite will be blocked. Use **Send a CSV** instead.

**Send a CSV**

For whoever runs your Google Cloud project. You need **BigQuery Job User** and **BigQuery Data Viewer** on it. BigQuery bills this query to your project.

**1. Run the export query**

Open a new query tab, paste this and click **Run**. Replace `your-project-id` and `PROPERTY_ID`. The query starts from 1 Jan 2025.

```sql Meta clicks theme={null}
SELECT DISTINCT
  FORMAT_TIMESTAMP('%Y-%m-%d %H:%M:%S', TIMESTAMP_MICROS(event_timestamp)) AS timestamp_utc,
  (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location') AS url
FROM `your-project-id.analytics_PROPERTY_ID.events_*`
WHERE _TABLE_SUFFIX >= '20250101'
  AND event_name = 'page_view'
  AND (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location') LIKE '%fbclid=%'
```

**2. Save the results**

Click **Save results** and choose **CSV (Google Drive)**. **CSV (local file)** also works for a small result.

Too large to save? Write it straight to a Cloud Storage bucket in the same location as the dataset. Replace `YOUR_BUCKET`:

```sql Large results theme={null}
EXPORT DATA OPTIONS (
  uri = 'gs://YOUR_BUCKET/dashfi-fbclid/clicks-*.csv',
  format = 'CSV',
  header = true,
  overwrite = true
) AS
SELECT DISTINCT
  FORMAT_TIMESTAMP('%Y-%m-%d %H:%M:%S', TIMESTAMP_MICROS(event_timestamp)) AS timestamp_utc,
  (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location') AS url
FROM `your-project-id.analytics_PROPERTY_ID.events_*`
WHERE _TABLE_SUFFIX >= '20250101'
  AND event_name = 'page_view'
  AND (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location') LIKE '%fbclid=%'
```

**3. Send it to us**

* **Google Drive:** open the file, click **Share**, add the Google account your Dash.fi contact sends you as a viewer.
* **Cloud Storage:** open the bucket's **Permissions**, click **Grant access**, add the same account with **Storage Object Viewer**.
* **Local file:** upload it to Google Drive and share it as above.

Then reply to your Dash.fi contact.

**Not linked to BigQuery**

GA4 only exports to BigQuery from the day it is linked, so there is nothing to share from it yet. Link it today so new clicks are kept on your side:

**1. Open BigQuery links**

In GA4, go to **Admin > Product links > BigQuery links > Link**.

**2. Choose the export**

Choose the **daily** export. Add **streaming** if your site sends more than 1 million events a day, since the daily export pauses above that.

For past clicks, use [visitor IPs from other tools](https://help.dash.fi/integrations/ad-pay-protection/click-history-other-tools.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.