In an effort to help advertisers meet their objectives across all creative formats, we're now offering video as a creative option when running link ads to drive clicks to your website. Earlier this year we added video creative to three (3) objectives: Page Likes, Local Awareness, and Website Conversions.
With this update, we're letting you pair the power of video with website clicks optimization to help you achieve your direct response advertising goals. We believe video will continue to be an important component of campaigns moving customers through the purchase funnel.
Link ads with video capabilities include a call-to-action button during and post-video play that drive people offsite to a website to increase website traffic and possibly convert on site.
Here are the steps to create a video Website Clicks ad:
WEBSITE_CLICKS
as the objectiveuse FacebookAds\Object\AdCampaign;
use FacebookAds\Object\Fields\AdCampaignFields;
$campaign = new AdCampaign(null, 'act_<AD_ACCOUNT_ID>');
$campaign->setData(array(
AdCampaignFields::NAME => 'my campaign group',
AdCampaignFields::STATUS => AdCampaign::STATUS_PAUSED,
AdCampaignFields::OBJECTIVE => AdObjectives::WEBSITE_CLICKS,
));
$campaign->create();
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Values\BidTypes;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'DailyBudgetSet',
AdSetFields::DAILY_BUDGET => 1000,
AdSetFields::BID_TYPE => BidTypes::BID_TYPE_ABSOLUTE_OCPM,
AdSetFields::BID_INFO => array(
'ACTIONS' => 150,
),
AdSetFields::TARGETING => array(
'geo_locations' => array(
'countries' => array('US'),
),
),
AdSetFields::CAMPAIGN_STATUS => AdSet::STATUS_ACTIVE,
AdSetFields::CAMPAIGN_GROUP_ID => <CAMPAIGN_ID>,
));
$adset->create();
object_story_spec
field for video_data
, with a link
.use FacebookAds\Object\AdCreative;
use FacebookAds\Object\ObjectStory\VideoData;
use FacebookAds\Object\Fields\ObjectStory\VideoDataFields;
use FacebookAds\Object\ObjectStorySpec;
use FacebookAds\Object\Fields\ObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;
$video_data = new VideoData();
$video_data->setData(array(
VideoDataFields::DESCRIPTION => 'New apple pies for the season',
VideoDataFields::IMAGE_URL => '<IMAGE_URL>',
VideoDataFields::VIDEO_ID => '<VIDEO_ID>',
VideoDataFields::CALL_TO_ACTION => array(
'type' => 'SHOP_NOW',
'value' => array(
'link' => '<LINK>',
)
),
));
$object_story_spec = new ObjectStorySpec();
$object_story_spec->setData(array(
ObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
ObjectStorySpecFields::VIDEO_DATA => $video_data,
));
$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->setData(array(
AdCreativeFields::NAME => 'AdCreative for Website Clicks Ad',
AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
));
$creative->create();
use FacebookAds\Object\AdGroup;
use FacebookAds\Object\Fields\AdGroupFields;
$ad = new AdGroup(null, 'act_<AD_ACCOUNT_ID>');
$ad->setData(array(
AdGroupFields::NAME => 'sample page post ad',
AdGroupFields::CAMPAIGN_ID => <AD_SET_ID>,
AdGroupFields::CREATIVE => array(
'creative_id' => <CREATIVE_ID>,
),
));
$ad->create();
Learn more about video ads here.
TAGS
Sign up for monthly updates from Meta for Developers.