Integrations

Connect Google BigQuery

Stream LeadJourney clicks, conversions and leads into a BigQuery dataset you own with a service account key, backfill past data, and read the tables from Looker Studio, Power BI or Tableau.

The Google BigQuery integration works in one direction: LeadJourney writes your clicks, conversions and leads into a dataset in your own Google Cloud project, with the attribution already resolved. Nothing is read back. You connect with a service account key, then add destinations: each one writes a row into a table whenever a LeadJourney event fires, using a column mapping you define. Looker Studio, Power BI and Tableau then read those tables with their own built-in BigQuery connectors.

Before you start

Have these ready so the connection works end to end:

  • An active LeadJourney workspace.
  • A Google Cloud project with BigQuery, and enough access to create a dataset, create a service account with a JSON key, and share the dataset with it.
  • Tracking is live, so there are clicks, conversions and leads to write. See Install the tracking script.

Where to find it

Open Settings → Apps, or go to app.leadjourney.io/settings?slug=apps. Click the Google BigQuery card. While you're not connected you'll see a “Connect your BigQuery dataset” card; once connected, the same screen shows the connection, your destinations and the sync history.

Step by step

Create the dataset in BigQuery

In Google Cloud, open BigQuery and create the dataset LeadJourney should write into, e.g. leadjourney. Note its region, because your BI tools will query the data there. The dataset must exist before you connect: LeadJourney deliberately can't create datasets, so the key never needs project-level rights.

Create a service account and a JSON key

Open IAM & Admin → Service Accounts and create a service account, e.g. leadjourney-writer. It needs no project-level roles. On that account, open Keys → Add key → Create new key → JSON. The file downloads once.

BigQuery has no OAuth flow for this kind of access, so a service account is the way to connect. It isn't tied to one person's Google login, so the connection keeps working when someone leaves.

Grant access on the dataset

In BigQuery, open your dataset → Sharing → Permissions, add the service account's email address and give it BigQuery Data Editor. Grant it on the dataset, not the project, so the key can only touch this one dataset. It can't read anything else in your project, and it can't create or delete datasets.

Connect in LeadJourney

On the Connect your BigQuery dataset card:

  1. Service account JSON key: paste the whole JSON file, including the outer { }. The card confirms which service account and project the key belongs to.
  2. BigQuery dataset: the dataset id (letters, numbers and underscores only).
  3. Google Cloud project (optional): only needed when the dataset lives in a different project from the service account. Blank uses the key's own project.
  4. Create missing tables: on by default. When you save a destination, LeadJourney creates the table and adds any columns your mapping needs. Turn it off if your data team owns the schema.

Click Connect. LeadJourney exchanges the key for a token and reads the dataset to prove the grant works before storing anything. The key is stored encrypted and never shown again.

Check the connection

The header shows a Live pill (or Needs reconnect), plus Connection, Dataset, Region and Destinations, with Update key and Disconnect buttons. The Connection panel shows which service account LeadJourney is “Writing as” and holds the Create missing tables switch. With it off, a destination whose table or columns don't exist is rejected when you save it.

Add a destination

In Send to BigQuery, click + Add destination and fill in:

  1. WRITE INTO THIS TABLE: pick an existing table, or type a name under Or type a new table name… and click Use. A suggested table is pre-filled for the selected event.
  2. WHEN THIS HAPPENS: the LeadJourney event, a click, a conversion or a lead.
  3. CONVERSION TYPE (conversions only): one conversion type, or Any conversion type.
  4. WRITE MODE: Append a row or Create or update a row (see below).
  5. MATCHING COLUMN (Create or update only): the column rows are matched on. It must be one of your mapped columns.

Map the columns and save

Under MAP COLUMNS, each row pairs a BigQuery column (pick one, or type a name under Or type a new column name… and click Set) with a LeadJourney value. Pick one or more values (several are joined with a space) or add a fixed value under Or type a fixed value…. Use + Add column for more rows. Find latest data loads recent real records, so every value shows an example; narrow it with Filter by click id / lead id….

Table and column names must start with a letter or underscore and use only letters, numbers and underscores. Click Create destination. If LeadJourney created the table or added columns, the confirmation says so. From then on, a row is written each time the event fires.

Choosing a write mode

ModeWhat it doesGood for
Append a row (insert)Adds a new row for every event.The full history, ready to aggregate.
Create or update a row (upsert)Keeps one row per value of the matching column and replaces it when that value comes back.A current-state table, e.g. one row per lead.

Managing your destinations

Each destination appears as a row, event → table, with an Active / Paused pill and the number of mapped columns.

  • Pause / Resume: stop writing without deleting the destination.
  • Edit: change the table, event, write mode or mapping.
  • Backfill: write past records into the table (see below).
  • Delete: confirm in Delete this destination?. Writing stops; the table and its rows are untouched.

Backfilling past data

A destination writes events from the moment it exists. For older records, click Backfill. In Backfill past data, choose the Range to backfill, click Count rows to see how many rows will be written, then click Start backfill. Live streaming keeps running meanwhile.

Append destinations can create duplicates

With Append a row, any record in the range that was already streamed is written a second time; BigQuery only de-duplicates within a few minutes of the original write. You have to tick I understand this may create duplicate rows to start. With Create or update a row, re-running the same range replaces rows instead of duplicating them.

Sync history

Sync history lists the rows written to BigQuery with Status (Success, Failed, Skipped), Event, Table, Mode, When and Detail. Click Retry on a failed or skipped write, or Refresh to reload. Each backfill shows as one line with its status (Queued, Running, Completed, Failed, Cancelled), counts and a progress bar; a queued or running backfill can be cancelled with Cancel.

Reconnecting

LeadJourney checks the connection whenever you open the integration. If the key is rejected or its dataset access was removed, you'll see Needs reconnect and a “BigQuery can’t be reached” banner, and no rows are written until it's fixed. Restore the BigQuery Data Editor grant for the address in the Connection panel, or click Update key and paste a new key. Your destinations are kept.

Disconnecting

Click Disconnect in the header. In Disconnect BigQuery?, type disconnect and confirm with Disconnect BigQuery.

Disconnect deletes your destinations

Disconnecting deletes every destination and its delivery history and drops the stored key. New clicks, conversions and leads stop being written immediately. Your dataset, its tables and every row already written stay exactly as they are, but the destination mappings aren't restored if you reconnect.

Reading the data in BI tools

Looker Studio, Power BI and Tableau connect to BigQuery natively, so LeadJourney has no separate connector for them. Point the tool at your dataset like any other BigQuery data. The account the BI tool signs in with needs its own read access, typically BigQuery Data Viewer on the dataset plus permission to run queries (e.g. BigQuery Job User) in the project that pays for them. Don't reuse LeadJourney's writer key for reporting.

Append a row tables hold one row per event, so aggregate them in the BI tool, or use a Create or update a row destination when you want one row per lead.

Looker Studio

  1. Click Create → Data source and choose the BigQuery connector.
  2. Authorize access with your Google account if asked.
  3. Select the project, dataset and table LeadJourney writes into (or use a custom query).
  4. Click Connect, review the fields and create a report.

A Looker Studio data source can use the owner's or the viewer's credentials; choose based on who should see the data.

Power BI

  1. In Power BI Desktop, choose Get dataGoogle BigQuery.
  2. Sign in with a Google account that can read the dataset.
  3. In the Navigator, expand the project and dataset and select the tables.
  4. Click Load (or Transform Data) and choose Import or DirectQuery when asked.

After publishing to the Power BI service, set the data source credentials there so scheduled refreshes run.

Tableau

  1. In Tableau Desktop, under Connect → To a Server, choose Google BigQuery.
  2. Sign in with a Google account that can read the dataset.
  3. Select the billing project, project and dataset.
  4. Drag the table onto the canvas and choose a Live connection or an Extract.

When publishing to Tableau Server or Tableau Cloud, embed or prompt for the BigQuery credentials so the workbook can refresh.

Troubleshooting

“Connect” fails or stays disabled?

Paste the complete JSON key of a service account, use a dataset id with only letters, numbers and underscores, and check that the dataset exists and the service account has BigQuery Data Editor on it. If the dataset lives in another project, fill in Google Cloud project.

Saving a destination is rejected?

With Create missing tables off, the table and every mapped column must already exist. For Create or update a row, the matching column must also be a mapped column.

Writes show “Failed” in Sync history?

The Detail column shows the error. Fix the cause (for example a removed grant or a changed column), then click Retry.

Common questions