Creating Facebook Ads

Before creating Facebook ads, please review Facebook Ads and Placements in the AdRoll Help Center. AdRoll must be given advertiser access using the AdRoll Dashboard or via the API by following the Facebook setup guide.

Static Ads

Facebook Static Ads (Facebook Website Clicks or Conversions Ads) are created by calling POST /api/v1/ad/create.

Request:

curl --user dev@example.com:my-password-is-great \
    -F advertisable=CEB5CCB477171F02AD0D8E \
    -F name="Test Facebook web ad 300x250" \
    -F destination_url=https://developers.adroll.com \
    -F file=@600x315.png \
    -F headline="This is the headline" \
    -F body="This is the body" \
    -F message="This is the message" \
    -F call_to_action="SHOP_NOW" \
    https://api.adroll.com/v1/ad/create

Response:

{
  "results": {
    "ad_format": "600 wide x 315 high",
    "ad_format_id": 24,
    "ad_format_name": "600x315 ",
    "ad_parameters": [],
    "adgroups": [],
    "advertisable": "CEB5CCB477171F02AD0D8E",
    "app_id": null,
    "body": "This is the body",
    "body_dynamic": null,
    "call_to_action": "SHOP_NOW",
    "created_date": "2016-10-26 16:35:37",
    "destination_url": "https://developers.adroll.com",
    "eid": "C451556324220B455FF2B9",
    "has_edits": false,
    "has_future_campaigns": false,
    "has_pending_edits": false,
    "headline": "This is the headline",
    "headline_dynamic": null,
    "height": 315,
    "inventory_type": "fbx",
    "is_active": true,
    "is_fb_dynamic": false,
    "is_liquid": null,
    "is_outlined": false,
    "lead_gen_form_id": null,
    "message": "This is the message",
    "message_dynamic": null,
    "multi_share_optimized": null,
    "multiple_products": null,
    "name": "Test Facebook web ad 300x250",
    "original_ad": null,
    "original_filename": "600x315.png",
    "outline_color": null,
    "replacement_ad": null,
    "src": "https://s.adroll.com/a/M4O/A6S/C451556324220B455FF2B9.png?v=2016-10-26 16:35:37.917069",
    "status": "admin_review",
    "type": "image",
    "updated_date": "2016-10-26 16:35:37",
    "valid_clicktag": true,
    "width": 600
  }
}

App Install Ads

Facebook App Install Ads drive users to install your mobile applications. To create an App Install ad, call POST /api/v1/ad/create.

Request:

curl --user dev@example.com:my-password-is-great \
    -F advertisable=CEB5CCB477171F02AD0D8E \
    -F name="Test Facebook App Install Ad 1200x627" \
    -F destination_url=https://play.google.com/store/apps/details?id=com.adroll.example \
    -F file=@1200x627.png \
    -F headline="This is the headline" \
    -F message="This is the message" \
    -F app_id="11111111111" \
    https://api.adroll.com/v1/ad/create

Response:

{
  "results": {
    "ad_format": "1200 wide x 627 high",
    "ad_format_id": 25,
    "ad_format_name": "1200x627 ",
    "ad_parameters": [],
    "adgroups": [],
    "advertisable": "CEB5CCB477171F02AD0D8E",
    "app_id": "11111111111",
    "body": null,
    "body_dynamic": null,
    "call_to_action": "",
    "created_date": "2016-10-26 16:50:14",
    "destination_url": "https://play.google.com/store/apps/details?id=com.philips.lighting.hue2",
    "eid": "BE9EAF745772ABC15B802B",
    "has_edits": false,
    "has_future_campaigns": false,
    "has_pending_edits": false,
    "headline": "This is the headline",
    "headline_dynamic": null,
    "height": 627,
    "inventory_type": "fbx",
    "is_active": true,
    "is_fb_dynamic": false,
    "is_liquid": null,
    "is_outlined": false,
    "lead_gen_form_id": null,
    "message": "This is the message",
    "message_dynamic": null,
    "multi_share_optimized": null,
    "multiple_products": null,
    "name": "Test Facebook App Install Ad 1200x627",
    "original_ad": null,
    "original_filename": "1200x627.png",
    "outline_color": null,
    "replacement_ad": null,
    "src": "https://s.adroll.com/a/AH6/EIM/BE9EAF745772ABC15B802B.png?v=2016-10-26 16:50:14.964838",
    "status": "admin_review",
    "type": "image",
    "updated_date": "2016-10-26 16:50:14",
    "valid_clicktag": true,
    "width": 1200
  }
}

Dynamic Product Ads

Dynamic Product Ads are personalized product ads. Dynamic ads feature previously-viewed, recommended, and top products. Product details are populated via product feeds you host on your server. Before you can run Dynamic Product Ads, you must first setup your product feed. Once setup you can call POST /api/v1/ad/create to create a Dynamic Product Ad.

To have the ad display multiple products at a time, set multiple_products to the number of products that should be displayed: 0, 3, 4, or 5.

Request:

curl --user dev@example.com:my-password-is-great \
    -F advertisable=CEB5CCB477171F02AD0D8E \
    -F name="Facebook Dynamic Product Ad" \
    -F is_fb_dynamic="true" \
    -F headline_dynamic="This is the headline" \
    -F body_dynamic="This is the body" \
    -F message_dynamic="This is the message" \
    -F call_to_action="SHOP_NOW" \
    -F file=@600x315.png \
    https://api.adroll.com/v1/ad/create

Response:

{
  "results": {
    "ad_format": "600 wide x 315 high",
    "ad_format_id": 24,
    "ad_format_name": "600x315 ",
    "ad_parameters": [],
    "adgroups": [],
    "advertisable": "M7B2HEGCWBCSZG45EX6Q3K",
    "app_id": null,
    "body": null,
    "body_dynamic": "This is the body",
    "call_to_action": "SHOP_NOW",
    "created_date": "2016-10-28 21:44:21",
    "destination_url": "",
    "eid": "74A0F09220C278C9AF3600",
    "has_edits": false,
    "has_future_campaigns": false,
    "has_pending_edits": false,
    "headline": null,
    "headline_dynamic": "This is the headline",
    "height": 315,
    "inventory_type": "fbx",
    "is_active": false,
    "is_fb_dynamic": true,
    "is_liquid": null,
    "is_outlined": false,
    "lead_gen_form_id": null,
    "message": null,
    "message_dynamic": "This is the message",
    "multi_share_optimized": null,
    "multiple_products": 3,
    "name": "Facebook Dynamic Product Ad",
    "original_ad": null,
    "original_filename": "600x315.png",
    "outline_color": null,
    "replacement_ad": null,
    "src": "https://s.adroll.com/a/IA3/GWC/74A0F09220C278C9AF3600.png?v=2016-10-28 21:44:21.951907",
    "status": "admin_review",
    "type": "image",
    "updated_date": "2016-10-28 21:44:21",
    "valid_clicktag": true,
    "width": 600
  }
}

Create a Facebook Campaign

Facebook ads cannot be combined with Web ads, so you’ll need to create a campaign specific to Facebook.

Create the Campaign

To create a Facebook campaign, call POST /api/v1/campaign/create and specify f as the networks parameter.

Request:

curl --user dev@example.com:my-password-is-great \
    -F advertisable=CEB5CCB477171F02AD0D8E \
    -F name="Test Facebook Campaign" \
    -F budget="200" \
    -F networks="f" \
    https://api.adroll.com/v1/campaign/create

Response:

{
  "results": {
    "adgroups": [],
    "advertisable": "CEB5CCB477171F02AD0D8E",
    "bid_type": null,
    "budget": 200.0,
    "campaign_type": "FB RHC FBX",
    "cpc": 0.0,
    "cpm": 0.0,
    "created_date": "2016-10-28T17:40:46+0000",
    "eid": "E0C3A090A22919FFA2422A",
    "end_date": null,
    "frequency_cap": null,
    "is_active": true,
    "is_apple": false,
    "is_cats4gold": false,
    "is_coop": false,
    "is_facebook": true,
    "is_fb_lookalike": false,
    "is_fb_wca": false,
    "is_fbx_newsfeed": false,
    "is_pubgraph": false,
    "is_retargeting": false,
    "is_rtb": true,
    "max_cpm": null,
    "name": "Test Facebook Campaign",
    "objective": "NONE",
    "pricing_strategies": [],
    "source": "api",
    "spend_limit_until": null,
    "start_date": "2016-10-29T00:00:00+0000",
    "status": "admin_review",
    "ui_budget_daily": true,
    "updated_date": "2016-10-28T17:40:46+0000"
  }
}

Create an AdGroup

To create an AdGroup for the Facebook campaign, call POST /api/v1/adgroup/create and specify which placements you want. In this example we’ll target all Facebook ad locations by specifying all as the placement_targets parameter.

If you created ads before your AdGroup, you can place them in the AdGroup at creation time using the ads parameter.

Request:

curl --user dev@example.com:my-password-is-great \
    -F campaign=E0C3A090A22919FFA2422A \
    -F name="Test Facebook AdGroup" \
    -F placements="all" \
    https://api.adroll.com/v1/adgroup/create

Response:

{
  "results": {
    "ad_optimization": "ctr",
    "ads": [],
    "campaign": "E0C3A090A22919FFA2422A",
    "coops": [],
    "created_date": "2016-10-28 17:47:52",
    "demographic_targets": [],
    "eid": "QSZQTGYUWZBG3PUBPTXXRA",
    "flight_timezone": "UTC",
    "geo_targets": [],
    "is_cats4gold": false,
    "name": "Test Facebook AdGroup",
    "placement_targets": [],
    "platform_targets": [],
    "segments": [],
    "site_exclusions": [],
    "space_optimization": "",
    "status": "approved",
    "type": "sites",
    "updated_date": "2016-10-28 17:47:52"
  }
}

Place Ads in the AdGroup

If you need to place ads into an AdGroup after you’ve already created them, you can call PUT /api/v1/adgroup/select_ads.

Request:

curl --user dev@example.com:my-password-is-great \
    -F adgroup=QSZQTGYUWZBG3PUBPTXXRA \
    -F ads="ICIL5XHNDZDBRPPBH75NBR" \
    https://api.adroll.com/v1/adgroup/select_ads

Response:

{
  "results": [
    {
      "ad": "ICIL5XHNDZDBRPPBH75NBR",
      "errors": [],
      "sites": []
    }
  ]
}