Google Ads to ClickHouse: How to Move Your Data

Move Google Ads into ClickHouse with Airbyte. Why figures move for two different reasons, the developer token request, and treating your tables as an archive.

Summarize with AI:

Moving Google Ads into ClickHouse puts advertising data in an engine fast enough to sit behind a live dashboard, at a fraction of the operational overhead of a full warehouse. Google reports the conversions it attributed to Google, and checking that needs spend beside your own revenue data.

Start the access request early, because the credential you need is approved by Google rather than generated by you. And expect figures to keep moving after they land, for two unrelated reasons that are worth keeping apart.

Google Ads to ClickHouse at a glance:

CapabilitySupportedWhat it means for this pipeline
Developer tokenGoogle approves itNeeds a Manager account, so start the request early
Granular retention37 monthsThe connector skips report rows older than the cutoff
Conversion window14 days defaultSet it to match your sales cycle, not the default
ClickHouse dedupeReplacingMergeTreeBackground merges, so add FINAL to guarantee it
Token access levelSets your allowanceBasic and standard access differ in daily operations

Why move data from Google Ads to ClickHouse?

Two situations account for most of these pipelines.

The first is serving campaign performance fast. If you already run ClickHouse behind an internal tool or a client-facing dashboard, putting spend data next to the event data already there means one engine answering both in milliseconds, without a warehouse bill attached.

The second is attribution you control, reconciling Google's claimed conversions against your own revenue. If you want a full analytical estate with governance and long-term modelling, a warehouse suits that better and the Google Ads guides for those cover it.

What do you need before you start?

The first item involves waiting on Google, so begin it before anything else:

A developer token, which needs a Manager account. You apply for it from a Google Ads Manager account and Google approves it, so this is a request with a waiting period rather than a setting you toggle. The Google Ads source documentation covers the process.

Your customer ID, and the login customer ID if you use a manager. The customer ID identifies the account whose data you want. If you access it through a Manager account, that manager's ID goes in the login customer field, and omitting it is a common cause of permission errors.

A conversion window agreed with marketing. It defaults to 14 days, and it should match how long your customers actually take to convert. A business with a two month sales cycle leaving it at the default will systematically under-report what its advertising achieved.

A ClickHouse instance and credentials. With permission to create tables in the target database. The destination writes through the native protocol into typed columns rather than storing everything as JSON in a raw table.

If your ClickHouse instance restricts inbound traffic by IP, add the Airbyte Cloud IP addresses to the allow list before you begin.

How do you build a Google Ads to ClickHouse pipeline in Airbyte?

Step 1: Request the developer token now

Start the application before you plan anything else, because it depends on Google rather than on you. While you wait, agree the conversion window with whoever runs your campaigns, since that conversation is the other thing that shapes what the numbers mean.

Step 2: Configure the Google Ads source

Click Sources in the left navigation, then New Source, and select Google Ads, following adding a source. Supply the developer token, authenticate, then enter the customer ID, the login customer ID if applicable, a start date and your conversion window.

Step 3: Configure the ClickHouse destination

Click Destinations, then New Destination, and select ClickHouse, following adding a destination. Supply host, port, database and credentials. Deduplication uses the ReplacingMergeTree table engine, and for it to order duplicates correctly your cursor should be a timestamp rather than a string, which on report data it naturally is.

Step 4: Use a deduplicating sync mode

Click Connections, then New connection, select your streams and choose incremental append and deduped as the sync mode. Daily suits advertising data, which settles over days as conversions are attributed rather than changing by the minute.

Your token's access level governs how many operations you may perform in a day, so if a large backfill is throttled, that level rather than any Airbyte setting is the constraint.

Why do figures keep changing after they land?

For two reasons that look identical from a dashboard and need different fixes. The first is attribution: Google credits a conversion back to the click that caused it, so a conversion recorded today can belong to a click from weeks ago and recent days genuinely keep moving.

The second is ClickHouse. ReplacingMergeTree collapses duplicate rows during background merges rather than on write, so a query run shortly after a sync can return rows that the same query returns cleanly an hour later. That is expected behaviour rather than a fault.

The fixes differ. Attribution movement is real and should be communicated, by marking days inside the conversion window as provisional. Merge behaviour is an artefact and should be hidden, by putting spend totals behind a view that uses FINAL. Knowing which you are looking at saves a great deal of time.

Why does your history stop at 37 months?

Because Google applies a data retention policy to granular report data, and beyond that window the detail is no longer available through the API. The connector skips report records older than the cutoff rather than failing, so a start date reaching further back quietly returns less than you asked for.

That makes your ClickHouse tables the only place long-term campaign history lives, which is worth stating plainly on an engine people sometimes treat as a cache. These tables are an archive, and data loaded before the cutoff moved past it cannot be recovered from Google.

So think carefully before any operation that would truncate and reload, and back these tables up like data you cannot fetch again. On a destination often used for fast-moving derived data, the instinct to rebuild from source is the wrong one here.

Frequently asked questions

Why do I need a Manager account?

Because the developer token is requested from one and approved by Google. Start that application early, since it is not something you can generate yourself.

Why does my table contain duplicate rows?

ReplacingMergeTree removes duplicates during background merges rather than immediately. Query with FINAL if you need guaranteed deduplication before those merges run.

Why is my start date not returning older data?

Google's granular data retention is 37 months, and the connector skips report records older than that cutoff rather than raising an error.

What should the conversion window be?

However long your customers actually take to convert, agreed with marketing and matching what they use in the Google Ads interface. The 14 day default suits impulse purchases rather than considered ones.

Can I do this without writing code?

Yes. The setup above is entirely UI-driven. You will want ClickHouse views using FINAL for your spend totals, which is a short piece of SQL.

Get your Google Ads data into ClickHouse

Request the developer token first because Google controls the timing, agree a conversion window matching your sales cycle, put spend totals behind a view using FINAL, and treat these tables as an archive rather than a cache given the 37 month retention behind them.

Airbyte's connector catalog includes 600+ pre-built connectors, so paid search can sit beside the revenue data that judges it. For the warehouse versions, see Google Ads to BigQuery, and for another advertising source in ClickHouse, Stripe to ClickHouse.

Start syncing now →

Integrate with 700+ apps using Airbyte

Move data from 700+ sources into warehouses, lakes, and beyond. Set up pipelines in minutes with pre-built connectors and the Connector Builder.