Facebook Ads Source

Getting Started

  1. From your workspace’s /sources page, click add source.

  2. Choose Facebook Ads.

  3. 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 Ads for nickname and facebook_ads, fb_ads, or fbads_prod for the schema name.

  4. Finally, just click Connect on the next page to OAuth into Facebook.

That’s it!

Components

Sync

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 fb_ads, the 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 budget from 0 to 100 between syncs, on its next sync that tickets status will be 100.

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.

Collections

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.

Permissions

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.

CollectionTypeDescription
ad_accountsobjectAn ad account is an account used to manage ads on Facebook
ad_setsobjectAn ad set is a group of ads that share the same daily or lifetime budget, schedule, bid type, bid info, and targeting data
adsobjectAn ad object contains the data necessary to visually display an ad and associate it with a corresponding ad set.
campaignsobjectA campaign is a grouping of ad sets which are organized by the same business objective.
insightsobjectInsights contain performance statistics for an ad broken down by day.

If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!