Facebook Audience Network

The Facebook Audience Network connector automates downloading performance data for your business and properties.

Prerequisites

As of July 2022 you must create a Facebook login or a Business login (System User) to access this functionality.

The Facebook Audience Network connector requires the following properties for a Facebook System User Key created in the Key Manger.

System User Name
You with need a System Username
Access Token
You will need to generate a System User Token in the Graph API Explorer as described in the Facebook Developer documentation

Scheduling

The Facebook Audience Network Ads connector can be scheduled to ingest data once per day at a user-defined hour and timezone.

By default, the connector will run once at 6am PT.

See Daily Scheduling for more information.

Parameters

application_ids
REQUIRED unique identifiers for the Facebook Application, available in the Facebook Business Settings under Accounts > Apps
metrics
REQUIRED See the Facebook Developer documentation for details on metrics
dimensions
REQUIRED See the Facebook Developer documentation on optional parameters for details on dimensions.
api_version
REQUIRED Note that Facebook updates its API versions often. Check the Graph API Explorer to determine the latest.

Sample Switchboard Script

download facebook_audience_network_raw from {
    type: "facebook:audience_network";
    application_ids: ["XXXXXXX"];  
    api_version: "v11.0";
   key: "XXXXXX";
    metrics: ["fb_ad_network_revenue",
            "fb_ad_network_request",
            "fb_ad_network_click",
            "fb_ad_network_imp",
            "fb_ad_network_filled_request",
            "fb_ad_network_bidding_request",
            "fb_ad_network_bidding_response"];
    dimensions: ["country",
                "platform",
                "property",
                "placement_name",
                "ad_space",
                "display_format",
                "delivery_method"];
    repull_days: 3;
} using {
    metric: string;
    breakdowns: json;
    value: float;
    time: datetime("yyyy-MM-dd'T'HH:mm:ssZ");
    application_id: integer;
    application_name: string;
};