Load your Facebook Ads data into a data warehouse Segment makes it easy to get your data from Facebook Ads (and lots of other sources) into your Data Warehouse for advanced analysis.
Take your company’s analysis to the next level by having SQL access to all your Facebook Ads data alongside your customer event data in Redshift and Postgres.
With your Facebook Ads data in your warehouse, you’ll be able to analyze your campaigns, ad set, ads and ad insights in SQL. Even cooler, you’ll be able to join your Facebook Ads data with the Segment event data you’re already sending to your warehouse, so you can now do things like combining your advertising spend and product usage data, analyzing advertising impact on new sales leads and understaind paid acquisition impact on support load.
From your workspace’s
Choose Facebook Ads.
Give the source a nickname and a schema name. The nickname will be used to designate the source in the Segment interface, and the schema name is the namespace you’ll be querying against in your warehouse. Both can be whatever you like, but we recommend sticking to something that reflects the source itself, like
Facebook Adsfor nickname and
fbads_prodfor the schema name.
Finally, just click Connect on the next page to OAuth into Facebook.
Facebook Ads has a sync component, which means we’ll make requests to their API on your behalf on a 3 hour interval to pull the latest data into Segment. In the initial sync, we’ll grab all the Facebook objects (and their corresponding properties) according to the Collections table below. The objects will be written into a separate schema, corresponding to the source instance’s schema name you designated upon creation. For example, if you went with
ads collection will be accessible at
fb_ads.ads in SQL.
Our sync component uses an upsert API, so the data in your warehouse loaded via sync will reflect the latest state of the corresponding resource in Facebook Ads. For example, if
100 between syncs, on its next sync that tickets status will be
The source syncs and warehouse syncs are independent processes. Source runs pull your data into the Segment Hub, and warehouse runs flush that data to your warehouse. Sources will sync with Segment every 3 hours. Depending on your Warehouses plan, we will push the Source data to your warehouse on the interval associated with your billing plan.
For a complete visual breakdown of the Facebook collections, all their properties, and ID linkages between objects, view the visual schema here.
Collections are the groupings of resources we pull from your source. In your warehouse, each collection gets its own table.
If your Facebook user has read permissions to Facebook Ads account’s data, you should be able to use your account for the Source. When setting up your Facebook Ads Source, we’ll show you available ad accounts to choose from.
|ad_accounts||object||An ad account is an account used to manage ads on Facebook|
|ad_sets||object||An ad set is a group of ads that share the same daily or lifetime budget, schedule, bid type, bid info, and targeting data|
|ads||object||An ad object contains the data necessary to visually display an ad and associate it with a corresponding ad set.|
|campaigns||object||A campaign is a grouping of ad sets which are organized by the same business objective.|
|insights||object||Insights contain performance statistics for an ad broken down by day.|