LoadersFacebook Ads

Facebook Ads Loader

The Facebook Ads loader pulls campaign structure and performance data from your Meta Ads accounts into your data warehouse. It uses the Meta Marketing API and supports incremental sync for insights data based on date segments.

Prerequisites

  • A Meta Business Manager account with access to the ad accounts you want to sync
  • A Facebook user account with at least Analyst or Advertiser access to the ad accounts
  • A connected Warehouse (target warehouse) with write permissions on the target schema

Authentication

The Facebook Ads loader uses OAuth 2.0 for authentication.

OAuth 2.0 Setup

  1. In SignalSmith, click Add Loader and select Facebook Ads
  2. Click Connect with Facebook
  3. You’ll be redirected to Facebook’s login page
  4. Log in and grant SignalSmith access to your ad accounts
  5. Select the ad accounts you want to connect
  6. You’ll be redirected back to SignalSmith with the connection established

SignalSmith requests the following permissions:

PermissionPurpose
ads_readRead ad account data (campaigns, ad sets, ads)
read_insightsRead performance metrics and reporting data
business_managementAccess ad accounts via Business Manager

Token Longevity

Facebook access tokens are typically short-lived (1-2 hours). SignalSmith exchanges the short-lived token for a long-lived token (60 days) and automatically handles re-authentication before expiry. If the token cannot be refreshed (e.g., user changed password, app deauthorized), you’ll need to reconnect.

Ad Account Selection

After authentication, SignalSmith lists all ad accounts accessible to the authenticated user. Select one or more ad accounts to sync. Each ad account is identified by its Account ID (e.g., act_123456789).

Available Objects

ObjectAPI NameDescriptionDefault Sync Mode
CampaignscampaignsCampaign settings, objective, status, and budgetIncremental
Ad Setsad_setsAd set targeting, budget, schedule, and optimization settingsIncremental
AdsadsIndividual ad creatives with their status and configurationIncremental
Ad Creativesad_creativesCreative assets — images, videos, headlines, and body textFull Refresh
Campaign Insightscampaign_insightsDaily campaign performance metricsIncremental
Ad Set Insightsad_set_insightsDaily ad set performance metricsIncremental
Ad Insightsad_insightsDaily ad-level performance metricsIncremental
Custom Audiencescustom_audiencesCustom audience definitions and sizesFull Refresh
Ad Accountad_accountAccount-level settings, currency, and timezoneFull Refresh

Insights (Performance Reports)

Insights objects contain daily aggregated performance metrics. Each row represents one day of data for the parent entity.

Key metrics available in insights:

MetricDescription
impressionsNumber of times ads were displayed
reachNumber of unique people who saw the ad
clicksTotal clicks (all types)
link_clicksClicks on outbound links
spendTotal amount spent (in account currency)
cpmCost per 1,000 impressions
cpcCost per click
ctrClick-through rate
conversionsTotal conversions (based on configured conversion events)
cost_per_conversionAverage cost per conversion
frequencyAverage number of times each person saw the ad
video_viewsNumber of video views (3-second threshold)

Breakdowns

Insights can be broken down by additional dimensions for more granular analysis:

BreakdownDescription
ageAge range of the audience
genderGender of the audience
countryCountry of the viewer
placementWhere the ad was shown (Feed, Stories, Reels)
device_platformDevice type (mobile, desktop)
publisher_platformPlatform (Facebook, Instagram, Audience Network)

Enable breakdowns during object configuration. Each enabled breakdown adds rows to the insights table (one row per dimension value per day).

Configuration

SettingDescriptionDefault
Ad Account IDFacebook ad account ID(s) to sync— (required)
ObjectsList of objects and reports to sync— (you choose during setup)
Insights BreakdownsAdditional dimensions for insights reportsNone
Sync ModeFull Refresh or Incremental (per object)Incremental
Date RangeLookback period for insights reportsLast 30 days
Attribution WindowConversion attribution window (1-day, 7-day, 28-day)7-day click, 1-day view
Primary KeyComposite key for insights rowsid + date (+ breakdown fields)
Target SchemaWarehouse schema for Facebook Ads tables— (required)
Table PrefixOptional prefix for table namesfb_
ScheduleSync frequencyDaily

Scheduling Notes

  • Attribution window: Facebook attributes conversions based on the configured attribution window. Conversion data can change for up to 28 days after the impression/click. SignalSmith re-fetches data within the lookback window to capture updated attribution.
  • Data freshness: Facebook insights data is typically finalized within 48 hours. Real-time metrics may show slight discrepancies with the Ads Manager UI.
  • Rate limits: The Meta Marketing API enforces rate limits based on ad account tier and API usage. SignalSmith handles rate limiting with exponential backoff.
  • Insights query limits: Facebook limits insights queries to 2 years of historical data per request. The initial backfill fetches up to 2 years of history.
  • Multiple ad accounts: If syncing multiple ad accounts, each account is extracted independently. Tables include an account_id column to distinguish between accounts.

Schema Mapping

Facebook Ads field types are mapped to warehouse-compatible types:

Facebook TypeWarehouse TypeNotes
stringVARCHAR
numeric stringBIGINTIDs are returned as strings but stored as BIGINT
floatDOUBLEMonetary values and rates
integerBIGINTCount metrics
datetimeTIMESTAMPUTC normalized
enumVARCHARStatus values, objectives
listJSON / VARCHARTargeting specs, action breakdowns
objectJSON / VARCHARNested structures

Troubleshooting

IssueSolution
”OAuthException: Error validating access token”Token has expired or been revoked. Re-authenticate by clicking “Reconnect"
"#100 Invalid parameter”An unsupported field or breakdown was requested. Contact SignalSmith support
”#17 User request limit reached”API rate limit exceeded. SignalSmith retries automatically. If persistent, reduce sync frequency
Insights data doesn’t match Ads ManagerCheck the attribution window setting. Facebook Ads Manager may use a different default attribution window
Missing recent campaign dataCampaign structure changes may take a few hours to appear in the API
Spend values are zeroVerify the ad account has active campaigns and that the date range covers active periods
”Ad account does not have permission”Ensure the authenticated user has Analyst or Advertiser access to the ad account

Next Steps