Offer Ads help advertise discounts and promotions with consumers. You can claim, save and redeem your offers, and if not, we can send a notification to remind you before it expires.
You can also bring Facebook's Offer Ads creation IU to your website using the JavaScript SDK. Learn more about the Offer Dialog below.
To create an offer ad, create an offer and promote it with link_data
, known as Ad Creative Link Data for AdCreativeObjectStorySpec
.
Create offers that are online
, offline
or both
. You can redeem online
offers on websites, offline
offers at local stores or both
online and at local stores. There are four types of offers available: percentage_off
, cash_discount
, bogo
and free_stuff
. For all offers options and parameters, see Page Native Offers
.
Note: You cannot update or delete offers; instead, create a new offer for use.
Provide the URL where people can redeem the online offer. If an offer needs a discount code, add one generic code for all people to use or upload a file with unique codes. See Unique Codes.
use FacebookAds\Http\RequestInterface;
$params = array(
'location_type' => 'online',
'discounts' => array(
array(
'type' => 'percentage_off',
'text' => 'the text description for this offer',
'value1' => 20,
),
array(
'type' => 'free_stuff',
'text' => 'the text description for this offer',
),
),
'redemption_link' => '<OFFER_URL>',
'redemption_code' => 'happysummer2016',
'details' => 'the details for this specific offer',
'expiration_time' => (new \DateTime("+10 day"))->getTimestamp(),
);
$data = Api::instance()->call(
'/'.<PAGE_ID>.'/nativeoffers',
RequestInterface::METHOD_POST,
$params)->getContent();
// You need to note down this Offer ID to Create Offer Ads
$offer_id = $data['id'];
curl \
-F 'location_type=online' \
-F 'discounts=[
{
"type": "percentage_off",
"text": "the text description for this offer",
"value1": 20
},
{"type":"free_stuff","text":"the text description for this offer"}
]' \
-F 'redemption_link=<OFFER_URL>' \
-F 'redemption_code=happysummer2016' \
-F 'details=the details for this specific offer' \
-F 'expiration_time=1518151463' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/<PAGE_ID>/nativeoffers
For mobile app offers, set redemption_link
to an app store URL, such as https://play.google.com/store/apps/details?id=com.myapps
.
Note: A mobile app offer's location_type
must be online.
To upload a file of unique offer codes, post the file through Native Offers
edge. Once you upload the file, the ad associated with the offer automatically changes each time a person claims it to show one of your unique codes.
Make sure your file has:
curl \ -F 'filename=my_unique_codes.csv' \ -F 'access_token=<ACCESS_TOKEN>' \ "https://graph.facebook.com/v2.7/<NATIVE_OFFER_ID>/codes"
To create an in-store offer, choose the type of code you want: discount code, barcode or no code. You can choose from 7 different barcodes, including QR codes. Anyone can get this barcode scanned from their mobile device at your local store.
Note: Not all scanner technologies can read mobile device screens. If you are unsure, check the documentation for your point of sale hardware.
use FacebookAds\Http\RequestInterface;
$params = array(
'location_type' => 'offline',
'barcode_type' => 'QR',
'barcode_value' => 'happysummer2016',
'discounts' => array(
array(
'type' => 'cash_discount',
'text' => '10 dollars off',
'value1' => 10,
),
),
'details' => 'the details for this specific offer',
'expiration_time' => (new \DateTime("+10 day"))->getTimestamp(),
);
$data = Api::instance()->call(
'/'.<PAGE_ID>.'/nativeoffers',
RequestInterface::METHOD_POST,
$params)->getContent();
$offer_id = $data['id'];
curl \
-F 'location_type=offline' \
-F 'barcode_type=QR' \
-F 'barcode_value=happysummer2016' \
-F 'discounts=[
{
"type": "cash_discount",
"text": "10 dollars off",
"value1": 10
}
]' \
-F 'details=the details for this specific offer' \
-F 'expiration_time=1518151462' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/<PAGE_ID>/nativeoffers
After an offer is created, you can promote the offer by injecting the offer ID to Ad object, which had been returned in the previous step. You can retrieve all Offer IDs via Page Nativeoffers
.
To create a campaign for Offer Ad, use Traffic, Conversion and Store Visits Objectives as the campaign objective.
To create a Mobile App Offer Ad, use corresponding campaign objectives that advertise on app install and engagement. See App Ads.
To create an ad set for a general offer, specify page_id
and offer_id
in PROMOTED_OBJECT
when creating an Ad Set.
curl -X POST \
-F 'name="My Offer Claim AdSet"' \
-F 'lifetime_budget=56000' \
-F 'start_time="2021-02-28T23:24:47-0800"' \
-F 'end_time="2021-03-07T23:24:47-0800"' \
-F 'campaign_id="<AD_CAMPAIGN_ID>"' \
-F 'billing_event="LINK_CLICKS"' \
-F 'optimization_goal="LINK_CLICKS"' \
-F 'bid_amount=1000' \
-F 'promoted_object={
"page_id": "<PAGE_ID>",
"offer_id": "<OFFER_ID>"
}' \
-F 'targeting={
"geo_locations": {
"countries": [
"US"
]
},
"genders": [
1
],
"age_min": "25",
"age_max": "55",
"facebook_positions": [
"feed"
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v10.0/act_<AD_ACCOUNT_ID>/adsets
In the PROMOTED_OBJECT
of the ad set, instead of page_id
, simply provide application_id
and object_store_url
for the app. You have to specify the offer_id
to be the Mobile App Offer you created.
Learn more about App Ads.
To create an Ad, provide ad creative with the right object story specs.
Include link_data
in the AdCreativeObjectStorySpec
. The link you provide in link_data
must be exactly the same as redemption_link
.
curl -X POST \
-F 'name="My New Offers Ad"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"object_story_spec": {
"page_id": "<PAGE_ID>",
"link_data": {
"offer_id": "<OFFER_ID>",
"link": "https://www.facebook.com/",
"message": "Great Deal",
"name": "30% off",
"image_hash": "<IMAGE_HASH>"
}
}
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v10.0/act_<AD_ACCOUNT_ID>/ads
To display videos in existing offers, provide video_data
in AdCreativeObjectStorySpec
instead of link_data
. See Video Ads.
For Carousel Offer Ads, provide AdCreativeLinkDataChildAttachments
. See Carousel Ad and Ad Link Data.
You can use the Create Offer dialog to provide the Facebook offer creation UI flow in your website. For details about the UI component, see Dialogs.
Set up the Facebook SDK for JavaScript, see:
Then trigger the Create Offer page:
FB.ui({ account_id: '<ACCOUNT_ID>', display: 'popup', method: 'create_offer', objective: '<OBJECTIVE>', page_id: '<PAGE_ID>', }, function(response) { // callback });
You can provide these settings for the dialog:
Name | Description |
---|---|
| Your ad account ID |
| popup |
| create_offer |
| Campaign objective |
| Your page ID |
The dialog provides this response on success:
Struct { id: numeric string, success: bool, }