Facebook Ads
Facebook Ads is a service promoting customer products, services, websites, etc. from Facebook.
Data integration: Skyvia supports importing data to and from Facebook Ads, exporting Facebook Ads data to CSV files, replicating Facebook Ads data to relational databases, and synchronizing Facebook Ads data with other cloud apps and relational databases.
Backup: Skyvia Backup does not support Facebook Ads backup.
Query: Skyvia Query supports Facebook Ads.
Establishing Connection
To create a connection with Facebook Ads, sign in with Facebook Ads and specify the Ad Account Id.
Getting Credentials
You can find the Ad Account Id in your Facebook Ads Manager. The Ad Account Id value is located above the search and filter bar, in the account dropdown menu or in the page URL.

Creating Connection
To connect to Facebook Ads, perform the following steps:

-
Click Sign In with Facebook.
-
Enter your facebook credentials and click Log In.

-
Enter your Ad Account Id
Connector Specifics
Object Peculiarities
There are two types of objects in Facebook Ads: standard objects and *Insights objects.
Insights Objects
Objects with *Insights suffix in their names are the metrics for the random period from DateStart to DateStop. Objects with Monthly*...*Insights names are the metrics for the completed calendar months. Objects with Daily*...*Insights names are the metrics for the completed days.
All these objects are read-only. They include only the data for the completed periods in the query results by default.
If you query the Daily*...*Insights objects, current date data is not included in the query results, because the day is not ended yet.
When you query Monthly*...*Insights objects, current month data is not included in the query results, because the current month is not ended yet.
Breakdowns
When you query the *Insights objects, you can group the query results data by one or several compatible breakdowns. Each breakdown corresponds to an enum value in the Breakdowns field. The Breakdowns field lets you choose how your data should be grouped. Skyvia represents it as a field for filtering, but it doesn’t work like a regular SQL filter. Instead, it reorganizes the query results based on one or more selected breakdowns. When you use filter by the Breakdowns field, you may see more rows, your metric values are recalculated for each group.
For example, to group the campaign analytics by devices, we use the following query:
1
2
3
SELECT CampaignId, ImpressionDevice, Clicks, Impressions, Breakdowns
FROM CampaignInsights
WHERE Breakdowns = '["ImpressionDevice"]'
Make sure you use native filters when querying the *Insights objects with breakdowns. Otherwise, data will not be grouped.
The ActionBreakdowns field works similarly to Breakdowns, but it affects only action-related metric fields such as Actions, Conversions, and associated fields.
The list of available breakdowns is the following:
| Type | Breakdown value |
|---|---|
| General | AdFormatAsset, Age, AppId, BodyAsset, CallToActioAsset, CoarseConversionValue, ConversionDestination, Country, DescriptionAsset, DevicePlatform, Dma, FidelityType, FrequencyValue, Gender, HourlyStatsAggregatedByAdvertiserTimeZone, HourlyStatsAggregatedByAudienceTimeZone, Hsid, ImageAsset, ImpressionDevice, IsConversionIdModeled, LandingDestination, LinkUrlAsset, MarketingMessagesBtnName, MdsaLandingDestination, MediaAassetUrl, MediaCreator, MediaDestinationUrl, MediaFormat, MediaOriginUrl, MediaTextContent, Mmm, PlacePageId, PlatformPosition, PostbackSequenceIndex, ProductId, PublisherPlatform, Redownload, Region, SkanCampaignId, SkanConversionId, SkanVersion, StandardEventContentType, TitleAsset, VideoAsset |
| Action breakdowns | ActionCanvasComponentName, ActionCarouselCardId, ActionCarouselCardName, ActionDestination, ActionDevice, ActionReaction, ActionTargetId, ActionType, ActionVideoSound, ActionVideoType, ConversionDestination, MatchedPersonaId, MatchedPersonaName, SignalSourceBucket, StandardEventContentType |
Campaigns
Campaigns in the Draft status are not displayed in the query results by default.
Filtering Specifics
Facebook Ads API supports the following native filters for the *Insights objects:
| Object Type | Filter by |
|---|---|
| AuctionBid, AuctionCompetitiveness, AuctionMaxCompetitorBid, CanvasAvgViewPercent, CanvasAvgViewTime, Clicks, CostPerDdaCountbyConvs, CostPerEstimatedAdRecallers, CostPerInlineLinkClick, CostPerInlinePostEngagement, CostPerUniqueClick, CostPerUniqueInlineLinkClick, Cpc, Cpm, Cpp, Ctr, DdaCountbyConvs, EstimatedAdRecallers, Frequency, Impressions, InlineLinkClickCtr, InlineLinkClicks, InlinePostEngagement, Instant_experience_outbound_clicks, InstantExperienceClicksToOpen, InstantExperienceClicksToStart, Reach, Spend, UniqueCtr, UniqueInlineLinkClicks, UniqueLinkClicksCtr | >, >=, <, <=, IN, NOT IN |
| ActionBreakdowns, Breakdowns, DateStart*, DateStop**, ReportTime | =* If you use filter by the DateStart field, Facebook Ads API returns records with the date >= than specified date. ** If you use filter by the DateStop field, Facebook Ads API returns records with the date <= than specified date. |
For other Facebook Ads objects the native filters are the following:
| Object | Field |
|---|---|
| Campaigns | Id, Name, Objective, BuyingType, SpendCap, CreatedTime, EffectiveStatus, UpdatedTime |
| AdSets | Id, Name, CampaignId, BillingEvent, OptimizationGoal, BidAmount, LifetimeBudget, DailyBudget, CreatedTime, UpdatedTime |
| Ads | Id, Name, CampaignId, AdSetId, BidAmount, CreatedTime, UpdatedTime |
| AdCreatives, AdVideos, AdImages | Id |
DML Operations Support
| Operation | Object |
|---|---|
| INSERT, UPDATE, DELETE | Campaigns, AdSets, Ads |
| INSERT, DELETE | AdImages, AdVideos |
| INSERT | LeadgenForms |
Incremental Replication and Synchronization
Skyvia supports Replication with Incremental Updates for the following Facebook Ads objects:
AccountInsights, AccountInsightsByCountry, AdImages, AdInsights, AdInsightsByCountry, Ads, AdSetInsights, AdSetInsightsByCountry, AdSets, AdVideos, CampaignInsights, CampaignInsightsByCountry, Campaigns, DailyAccountInsights, DailyAccountInsightsByCountry, DailyAdInsights, DailyAdInsightsByCountry, DailyAdSetInsights, DailyAdSetInsightsByCountry, DailyCampaignInsights, DailyCampaignInsightsByCountry, LeadgenForms, MonthlyAccountInsights, MonthlyAccountInsightsByCountry, MonthlyAdInsights, MonthlyAdInsightsByCountry, MonthlyAdSetInsights, MonthlyAdSetInsightsByCountry, MonthlyCampaignInsights, MonthlyCampaignInsightsByCountry.
Skyvia detects only new records and doesn't track the updated records for the LeadgenForms object.
Skyvia tracks the object changes using the DateStart and DateStop fields.
By default, Skyvia replicates Monthly*...*Insights data for the last 36 months and Daily*...*Insights data — for the last 6 months during the initial replication run. To replicate reports for earlier periods, you can set the LastSyncTime parameter to the needed start date before the initial replication run.
Skyvia supports Synchronization for the following Facebook Ads objects: Ads, AdSets, Campaigns.
Supported Actions
Skyvia supports all the common actions for Facebook Ads.