Last 10 free Supermetrics migrations

Chapter 2 of 12 · min 2:19 to 5:15

How to keep your ad history forever: warehouse and incremental deduplication

The solution to the ad-level data problem: a BigQuery warehouse, a one-time historical load before the platforms delete your data, images in your own cloud, and incremental deduplication.

The solution: warehouse, history and incremental deduplication

Watch on YouTube (from 2:19) · Spanish audio

Centralize everything in a data warehouse

The solution starts by changing where the data lives: instead of using Google Sheets or Looker Studio to store it, use a data warehouse like BigQuery.

The first step is loading the historical data for all your ads, once. That download can take quite a while, but it runs a single time, covering the entire time range the platforms allow.

There’s an important detail here: Meta keeps the last 3 years on a rolling basis. A day goes by, and it deletes a day from 3 years ago. If we load those 3 years into our warehouse, they stay forever, and we stop losing data with every day that passes.

Slide from the video: load the history once, store the images and sync efficiently

The images, in your own cloud

The platforms don’t store ad images forever either. When you request an image through the API, they return a URL that expires after 7 days. Build a report with that data today, and next week the images stop working.

The fix is storing every creative in your own cloud, so it stays on your side and doesn’t depend on the platform. That way you keep the metric history (how much each ad spent and how many conversions it brought) together with all the images.

Incremental deduplication: keeping everything fresh, efficiently

Once the history is loaded, the data updates in the most efficient way possible: incremental deduplication.

The idea: always fetch the last 10 days, which is the attribution window on most platforms. During those days, each ad’s metrics keep shifting because attribution keeps adjusting, following each platform’s internal rules. Past the window, the data for any given ad never changes again.

So: for 10 days the recent data gets refreshed, and then it becomes part of the permanent history. This way you can sync any number of accounts and any volume of ads, because a warehouse handles millions of rows without slowing down your dashboards. And with the images stored, you can build visual reports, which is the ideal when analyzing ad-level data: the image or the video is what matters most.

Frequently asked questions

How much ad history does Meta keep?

Meta stores the last 3 years on a rolling basis: a day goes by, and the matching day from 3 years ago gets deleted. If you don't load that history into your own warehouse, the data is lost forever.

Why do the ad images in my reports break?

When you request an ad's image through the API, the platforms return a URL that expires after 7 days. A report built today stops showing its images next week, unless you store them in your own cloud.

What is incremental deduplication?

The most efficient way to keep the warehouse fresh: only the recent window where attribution is still changing (about 10 days on most platforms) gets refreshed, and everything else stays as permanent history.

All chapters in this series

  1. 0:00 1. The problem: ad-level data
  2. 2:19 2. The solution: warehouse, history and incremental deduplication
  3. 5:15 3. A look at the final result in BigQuery
  4. 8:27 4. Step one: connect Claude to Detrics via MCP
  5. 11:02 5. Step two: explore the sources and design the data schema with Claude
  6. 13:51 6. How the Detrics warehouse works
  7. 19:31 7. The table groups created in Detrics
  8. 22:04 8. Step three: create the destination in your own Google Cloud
  9. 25:27 9. Step four: transfers and the historical load
  10. 30:53 10. The data in BigQuery: tables, rows and creatives in your bucket
  11. 33:19 11. Analyzing the data with Claude and the BigQuery MCP
  12. 37:41 12. Final step: the unified Meta + TikTok view

Want to build this with your own data?