Anuncios con vídeo y por secuencia

La API te permite crear, medir y optimizar fácilmente anuncios con vídeo y por secuencia en Facebook. Consulta Anuncios por secuencia en Facebook para empresas. Para ver los formatos de vídeo que se admiten para los anuncios, consulta la documentación Vídeos en el servicio de ayuda para anunciantes.

Anuncios con vídeo

Documentos de referencia

Para crear un anuncio con vídeo en un objetivo VIDEO_VIEWS y optimizar la puja para el alcance, sigue los pasos que se indican a continuación:

Paso 1: Proporcionar el contenido del anuncio

Crea un anuncio con vídeo mediante un identificador de vídeo existente y un vídeo subido a Facebook.

Necesitarás lo siguiente:

  • Permisos pages_read_engagement y ads_management
  • Un vídeo subido al extremo act_{ad-account-id}/advideos
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\AdCreativeVideoData;
use FacebookAds\Object\Fields\AdCreativeVideoDataFields;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;


$video_data = new AdCreativeVideoData();
$video_data->setData(array(
  AdCreativeVideoDataFields::IMAGE_URL => '<THUMBNAIL_URL>',
  AdCreativeVideoDataFields::VIDEO_ID => <VIDEO_ID>,
));

$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
  AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
  AdCreativeObjectStorySpecFields::VIDEO_DATA => $video_data,
));

$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');

$creative->setData(array(
  AdCreativeFields::NAME => 'Sample Creative',
  AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
));

$creative->create();
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativeobjectstoryspec \
    import AdCreativeObjectStorySpec
from facebookads.adobjects.adcreativevideodata \
    import AdCreativeVideoData

video_data = AdCreativeVideoData()
video_data[AdCreativeVideoData.Field.description] = 'My Description'
video_data[AdCreativeVideoData.Field.video_id] = <VIDEO_ID>
video_data[AdCreativeVideoData.Field.image_url] = '<IMAGE_URL>'

object_story_spec = AdCreativeObjectStorySpec()
object_story_spec[AdCreativeObjectStorySpec.Field.page_id] = <PAGE_ID>
object_story_spec[AdCreativeObjectStorySpec.Field.video_data] = video_data

creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'Video Ad Creative'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative.remote_create()
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
  .setName("Sample Creative")
  .setObjectStorySpec(
    new AdCreativeObjectStorySpec()
      .setFieldPageId(<PAGE_ID>)
      .setFieldVideoData(
        new AdCreativeVideoData()
          .setFieldImageUrl(<THUMBNAIL_URL>)
          .setFieldVideoId(<VIDEO_ID>)
      )
  )
  .execute();
String ad_creative_id = adCreative.getId();
curl \
  -F 'name=Sample Creative' \
  -F 'object_story_spec={ 
    "page_id": "<PAGE_ID>", 
    "video_data": {"image_url":"<THUMBNAIL_URL>","video_id":"<VIDEO_ID>"} 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives

Presentación

Si deseas ampliar o lanzar campañas de marca para teléfonos básicos en mercados emergentes o crear un vídeo sencillo, prueba las presentaciones con imágenes. Sube imágenes a un activo de vídeo. Por ejemplo:

use FacebookAds\Object\AdVideo;
use FacebookAds\Object\Fields\AdVideoFields;

$video = new AdVideo(null, 'act_<AD_ACCOUNT_ID>');
$video->{AdVideoFields::SLIDESHOW_SPEC} = array (
  'images_urls' => array(
    '<IMAGE_URL_1>',
    '<IMAGE_URL_2>',
    '<IMAGE_URL_3>',
  ),
  'duration_ms' => 2000,
  'transition_ms' => 200,
);

$video->create();
from facebookads.adobjects.advideo import AdVideo
from facebookads.specs import SlideshowSpec

video = AdVideo(parent_id='act_<AD_ACCOUNT_ID>')
slideshow = SlideshowSpec()
slideshow.update({
    SlideshowSpec.Field.images_urls: <IMAGE_URLS>,
    SlideshowSpec.Field.duration_ms: 2000,
    SlideshowSpec.Field.transition_ms: 200,
})

video[AdVideo.Field.slideshow_spec] = slideshow
video.remote_create()
new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdVideo()
  .setSlideshowSpec("{\"images_urls\":[\"" + <IMAGE_URL_1> + "\",\"" + <IMAGE_URL_2> + "\",\"" + <IMAGE_URL_3> + "\"],\"duration_ms\":\"2000\",\"transition_ms\":\"200\"}")
  .execute();
curl \
  -F 'slideshow_spec={ 
    "images_urls": [ 
      "<IMAGE_URL_1>", 
      "<IMAGE_URL_2>", 
      "<IMAGE_URL_3>" 
    ], 
    "duration_ms": 2000, 
    "transition_ms": 200 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph-video.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/advideos

Consulta Prácticas recomendadas para contenido de vídeo y Referencia: Vídeos publicitarios.

Paso 2: Crear una campaña publicitaria

Establece el objetivo en VIDEO_VIEWS:

curl -X POST \ -F 'name="Video Views campaign"' \ -F 'objective="OUTCOME_ENGAGEMENT"' \ -F 'status="PAUSED"' \ -F 'special_ad_categories=[]' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/campaigns
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const Campaign = bizSdk.Campaign; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'name' : 'Video Views campaign', 'objective' : 'OUTCOME_ENGAGEMENT', 'status' : 'PAUSED', 'special_ad_categories' : [], }; const campaigns = (new AdAccount(id)).createCampaign( fields, params ); logApiCallResult('campaigns api call complete.', campaigns);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\Campaign; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'Video Views campaign', 'objective' => 'OUTCOME_ENGAGEMENT', 'status' => 'PAUSED', 'special_ad_categories' => array(), ); echo json_encode((new AdAccount($id))->createCampaign( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.campaign import Campaign from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'name': 'Video Views campaign', 'objective': 'OUTCOME_ENGAGEMENT', 'status': 'PAUSED', 'special_ad_categories': [], } print AdAccount(id).create_campaign( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).createCampaign() .setName(\"Video Views campaign\") .setObjective(Campaign.EnumObjective.VALUE_OUTCOME_ENGAGEMENT) .setStatus(Campaign.EnumStatus.VALUE_PAUSED) .setParam(\"special_ad_categories\", \"[]\") .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) campaigns = ad_account.campaigns.create({ name: 'Video Views campaign', objective: 'OUTCOME_ENGAGEMENT', status: 'PAUSED', special_ad_categories: [], })

Consulta Referencia: Campaña, AdObjectives en PHP y AdObjectives en Python

Paso 3: Crear un conjunto de anuncios

Si tu objetivo es lograr el menor coste posible por reproducción, debes emparejar el objetivo de la campaña de reproducción de vídeo con el elemento optimization_goal=THRUPLAY de un conjunto de anuncios. Puedes establecer bidding_event en IMPRESSIONS o THRUPLAY para que el pago se realice por impresión o reproducción de vídeo. Consulta la documentación Pujas de CPV.

curl \
  -F 'name=A CPV Ad Set' \
  -F 'campaign_id=<CAMPAIGN_ID>' \
  -F 'daily_budget=500' \
  -F 'start_time=2018-02-06T04:45:29+0000' \
  -F 'end_time=2018-02-13T04:45:29+0000' \
  -F 'billing_event=THRUPLAY' \
  -F 'optimization_goal=THRUPLAY' \
  -F 'bid_amount=100' \
  -F 'targeting={ 
    "device_platforms": ["mobile"], 
    "geo_locations": {"countries":["US"]}, 
    "publisher_platforms": ["facebook"] 
  }' \
  -F 'status=PAUSED' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adsets

Las tarifas de coste por reproducción son inferiores para los conjuntos de anuncios con optimization_goal=THRUPLAY en comparación con los CPV de compra de alcance y frecuencia optimizada para las reproducciones de vídeo. Consulta la documentación Referencia: Conjunto de anuncios.

Paso 4: Crear un anuncio

Usa el conjunto de anuncios y el contenido del anuncio que ya tienes:

curl -X POST \ -F 'name="My Ad"' \ -F 'adset_id="<AD_SET_ID>"' \ -F 'creative={ "creative_id": "<CREATIVE_ID>" }' \ -F 'status="PAUSED"' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/ads
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const Ad = bizSdk.Ad; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'name' : 'My Ad', 'adset_id' : '<adSetID>', 'creative' : {'creative_id':'<adCreativeID>'}, 'status' : 'PAUSED', }; const ads = (new AdAccount(id)).createAd( fields, params ); logApiCallResult('ads api call complete.', ads);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\Ad; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'My Ad', 'adset_id' => '<adSetID>', 'creative' => array('creative_id' => '<adCreativeID>'), 'status' => 'PAUSED', ); echo json_encode((new AdAccount($id))->createAd( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.ad import Ad from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'name': 'My Ad', 'adset_id': '<adSetID>', 'creative': {'creative_id':'<adCreativeID>'}, 'status': 'PAUSED', } print AdAccount(id).create_ad( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).createAd() .setName(\"My Ad\") .setAdsetId(<adSetID>L) .setCreative( new AdCreative() .setFieldId(\"<adCreativeID>\") ) .setStatus(Ad.EnumStatus.VALUE_PAUSED) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) ads = ad_account.ads.create({ name: 'My Ad', adset_id: '<adSetID>', creative: {'creative_id':'<adCreativeID>'}, status: 'PAUSED', })

Si el objetivo de campaña es VIDEO_VIEWS, de manera predeterminada, el anuncio obtiene las especificaciones de seguimiento adecuadas que definen las acciones de las que se realiza un seguimiento para un anuncio. Por ejemplo, las reproducciones de vídeo:

{'action.type':'video_view','post':'POST_ID','post.wall':'PAGE_ID'}
    

Consulta Administrador de anuncios: Mis campañas y Referencia: Anuncio.

Ejemplo de reconocimiento de marca

Para crear un anuncio con vídeo para el reconocimiento de marca, consulta el blog de reconocimiento de marca.

Ejemplo de alcance y frecuencia

Documentos de referencia

Para conseguir que un vídeo llegue a más personas, utiliza el objetivo de la campaña de reproducción de vídeo con Alcance y frecuencia. Deberás crear una predicción, reservarla y asignarla a tu conjunto de anuncios.

Sigue el proceso de creación de reproducción de vídeo, pero aplica el alcance y frecuencia al conjunto de anuncios. Especifica estos parámetros adicionales:

$adset->{AdSetFields::RF_PREDICTION_ID} = <RESERVATION_ID>;
adset[AdSet.Field.prediction_id] = <RESERVATION_ID>
-F "rf_prediction_id=<RESERVATION_ID>" \

Vídeos para incentivar la respuesta directa

Para animar a las personas a pasar del reconocimiento a la acción, consulta Contenido del vídeo en el formato por secuencia.

  • Llega a personas que miraron un vídeo: del reconocimiento a la afinidad y la consideración. Consulta la documentación sobre remarketing.
  • Interactúa con la marca y los productos: añade una llamada a la acción para que se visite una página concreta de tu sitio web. Consulta la documentación sobre la llamada a la acción.

Remarketing

El remarketing de anuncios con vídeo ayuda a los anunciantes a llegar a ciertas audiencias personalizadas creadas a partir de vídeos orgánicos o patrocinados en Facebook e Instagram. Usa esta función para que las personas avancen desde la fase de reconocimiento hasta otras más avanzadas del embudo, como la afinidad y la consideración. Consulta Investigación: combinaciones de contenido que funcionan.

Si deseas crear una audiencia para un vídeo incluido en una página, necesitas permisos de anunciante en la página.

Para la audiencia, establece subtype=ENGAGEMENT. A continuación, escribe las reglas para la audiencia que desees crear. Cada regla tiene un valor de object_id, como el identificador de vídeo y event_name. El elemento event_name es uno de los siguientes:

  • video_watched: número de veces que se ha reproducido tu vídeo durante un total de tres segundos como mínimo, o casi en su totalidad, lo que ocurra primero.
  • video_completed: número de veces que se ha reproducido tu vídeo hasta el 95 % de su duración, incluidas las reproducciones en las que se avanzó hasta este punto.
  • video_view_10s: número de veces que se ha reproducido tu vídeo durante un total de 10 segundos como mínimo, o casi en su totalidad, lo que ocurra primero.
  • video_watched: número de veces que se ha reproducido tu vídeo durante un total de 15 segundos como mínimo, o casi en su totalidad, lo que ocurra primero.
  • video_view_25_percent: número de veces que se ha reproducido tu vídeo hasta el 25 % de su duración, incluidas las reproducciones en las que se avanzó hasta este punto.
  • video_completed: número de veces que se ha reproducido tu vídeo hasta el 50 % de su duración, incluidas las reproducciones en las que se avanzó hasta este punto.
  • video_view_75_percent: número de veces que se ha reproducido tu vídeo hasta el 75 % de su duración, incluidas las reproducciones en las que se avanzó hasta este punto.

Puedes combinar vídeos para crear una audiencia basada en diferentes vídeos y acciones. Por ejemplo, una audiencia puede contener reproducciones de tres segundos del vídeo A y reproducciones completas de los vídeos B y C.

Así se crea una audiencia con los espectadores de los últimos 14 días que han visto el vídeo 1 durante al menos tres segundos y los que han visto el vídeo 2 completo. La audiencia también se rellena automáticamente con los espectadores anteriores a la creación de la audiencia mediante prefill=true.

use FacebookAds\Object\CustomAudience;
use FacebookAds\Object\Fields\CustomAudienceFields;


$audience = new CustomAudience(null, $ad_account_id);
$audience->setData(array(
  CustomAudienceFields::NAME => 'Video Ads Engagement Audience',
  CustomAudienceFields::SUBTYPE => 'ENGAGEMENT',
  CustomAudienceFields::DESCRIPTION => 'Users who watched my video',
  CustomAudienceFields::PREFILL => true,
  CustomAudienceFields::RULE => array(
    array(
      'object_id' => $video_id_1,
      'event_name' => 'video_watched',
    ),
    array(
      'object_id' => $video_id_2,
      'event_name' => 'video_completed',
    ),
  ),
));

$audience->create();
from facebookads.adobjects.customaudience import CustomAudience

audience = CustomAudience(parent_id=ad_account_id)
audience[CustomAudience.Field.subtype] = CustomAudience.Subtype.engagement
audience[CustomAudience.Field.name] = 'Video Ads Engagement Audience'
audience[CustomAudience.Field.description] = 'Users who watched my video'
audience[CustomAudience.Field.prefill] = True
audience[CustomAudience.Field.rule] = [
    {
        "object_id": video_id_1,
        "event_name": "video_watched",
    },
    {
        "object_id": video_id_2,
        "event_name": "video_completed",
    },
]
audience.remote_create()
curl \
  -F 'name=Video Ads Engagement Audience' \
  -F 'subtype=ENGAGEMENT' \
  -F 'description=Users who watched my video' \
  -F 'prefill=1' \
  -F 'rule=[ 
    {"object_id":"%video_id_1","event_name":"video_watched"}, 
    {"object_id":"%video_id_2","event_name":"video_completed"} 
  ]' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/%ad_account_id/customaudiences

El relleno retrospectivo se admite para las reproducciones de vídeo realizadas a partir del 16 de octubre de 2015.

Llamada a la acción

Los vídeos con llamada a la acción (CTA) invitan a las personas a obtener más información y visitar una página concreta de un sitio web. Se mejora el rendimiento cuando el objetivo principal es aumentar las reproducciones de vídeo o el reconocimiento de marca y, el secundario, generar más clics fuera del sitio web. En el segundo caso, usa un anuncio con vídeo y enlace. Cómo se representan las llamadas a la acción:

  • En los móviles y los ordenadores, aparecen como parte de la publicación. Cuando el vídeo se pone en pausa, aparecen junto a la opción “Reanudar”.
  • En los móviles, cuando alguien hace clic en un vídeo para verlo a pantalla completa, aparece una llamada a la acción flotante como una superposición de vídeo.
  • Las publicaciones con vídeos y enlaces externos no muestran llamadas a la acción.

Solo puedes usar vídeos con llamadas a la acción con los siguientes objetivos de campaña:

Consulta Expansión de vídeo para objetivos adicionales. De este modo, se crea un anuncio con vídeo con la llamada a la acción GET_DIRECTIONS:

use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeVideoDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\AdCreativeVideoData;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\Values\AdCreativeCallToActionTypeValues;

$video_data = new AdCreativeVideoData();
$video_data->setData(array(
  AdCreativeVideoDataFields::IMAGE_URL => '<THUMBNAIL_URL>',
  AdCreativeVideoDataFields::VIDEO_ID => <VIDEO_ID>,
  AdCreativeVideoDataFields::LINK_DESCRIPTION =>
    "Come check out our new store in Menlo Park!",
  AdCreativeVideoDataFields::CALL_TO_ACTION => array(
    'type' => AdCreativeCallToActionTypeValues::GET_DIRECTIONS,
    'value' => array(
      'link' => 'fbgeo://37.48327, -122.15033, "1601 Willow Rd Menlo Park CA"',
    ),
  ),
));

$story = new AdCreativeObjectStorySpec();
$story->setData(array(
  AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
  AdCreativeObjectStorySpecFields::VIDEO_DATA => $video_data,
));

$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->{AdCreativeFields::OBJECT_STORY_SPEC} = $story;
$creative->create();
from facebookads.adobjects.adcreativevideodata import AdCreativeVideoData
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativeobjectstoryspec \
    import AdCreativeObjectStorySpec

video_data = AdCreativeVideoData()
video_data[AdCreativeVideoData.Field.image_url] = image_url
video_data[AdCreativeVideoData.Field.video_id] = <VIDEO_ID>
video_data[AdCreativeVideoData.Field.description]\
    = 'Come check out our new store in Menlo Park!'
video_data[AdCreativeVideoData.Field.call_to_action] = {
    'type': 'GET_DIRECTIONS',
    'value': {
        'link': 'fbgeo://37.48327, -122.15033, "1601 Willow Rd Menlo Park CA"',
    },
}

story = AdCreativeObjectStorySpec()
story[AdCreativeObjectStorySpec.Field.page_id] = <PAGE_ID>
story[AdCreativeObjectStorySpec.Field.video_data] = video_data

creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.object_story_spec] = story
creative.remote_create()
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
  .setObjectStorySpec(
    new AdCreativeObjectStorySpec()
      .setFieldPageId(<PAGE_ID>)
      .setFieldVideoData(
        new AdCreativeVideoData()
          .setFieldCallToAction(
            new AdCreativeLinkDataCallToAction()
              .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_GET_DIRECTIONS)
              .setFieldValue(
                new AdCreativeLinkDataCallToActionValue()
                  .setFieldLink("fbgeo://37.48327, -122.15033, \"1601 Willow Rd Menlo Park CA\"")
              )
          )
          .setFieldLinkDescription("Come check out our new store in Menlo Park!")
          .setFieldImageUrl(<THUMBNAIL_URL>)
          .setFieldVideoId(<VIDEO_ID>)
      )
  )
  .execute();
String ad_creative_id = adCreative.getId();
curl \
  -F 'object_story_spec={ 
    "page_id": "<PAGE_ID>", 
    "video_data": { 
      "call_to_action": { 
        "type": "GET_DIRECTIONS", 
        "value": { 
          "link": "fbgeo:\/\/37.48327, -122.15033, \"1601 Willow Rd Menlo Park CA\"" 
        } 
      }, 
      "image_url": "<THUMBNAIL_URL>", 
      "link_description": "Come check out our new store in Menlo Park!", 
      "video_id": "<VIDEO_ID>" 
    } 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives

Resultados de vídeo

Estadísticas de publicaciones con vídeo orgánicas

Obtén más información sobre el rendimiento de tus vídeos en Facebook y toma decisiones más fundamentadas sobre tu contenido de vídeo. En este momento, solo proporcionamos los resultados correspondientes a cuando se inicia la visualización de los vídeos: reproducciones de vídeo, reproducciones de vídeo únicas, duración promedio de la reproducción de vídeo y retención de la audiencia. Descubre en qué momento las personas dejan de ver tus vídeos y las partes que posiblemente les parecen más interesantes.

Estadísticas de publicaciones de vídeo patrocinadas

Utiliza la API de insights de anuncios. La respuesta contiene varias métricas de vídeo.

Tipo de vídeo

Obtén las estadísticas de los anuncios con vídeo agrupadas por tipo de vídeo (por ejemplo, de reproducción automática o con clic). Incluye action_video_type en action_breakdowns. Los valores esperados para action_video_type son total, click_to_play y auto_play.

Actualmente, nos encontramos en fase de pruebas limitadas para la opción action_video_type. Para identificar a los clientes con el desglose, consulta CAN_USE_VIDEO_METRICS_BREAKDOWN para la cuenta publicitaria.

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdsInsightsFields;
use FacebookAds\Object\Values\AdsInsightsActionBreakdownsValues;
use FacebookAds\Object\Values\AdsInsightsDatePresetValues;

$account = new AdAccount('act_<AD_ACCOUNT_ID>');

$params = array(
  'action_breakdowns' => AdsInsightsActionBreakdownsValues::ACTION_VIDEO_TYPE,
  'date_preset' => AdsInsightsDatePresetValues::LAST_30D,
);

$fields = array(
  AdsInsightsFields::ACTIONS,
  AdsInsightsFields::VIDEO_AVG_PCT_WATCHED_ACTIONS,
  AdsInsightsFields::VIDEO_COMPLETE_WATCHED_ACTIONS,
);

$stats = $account->getInsights($fields, $params);
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adsinsights import AdsInsights

account = AdAccount('act_<AD_ACCOUNT_ID>')

params = {
    'action_breakdowns': AdsInsights.ActionBreakdowns.action_video_type,
    'date_preset': AdsInsights.DatePreset.last_30_days,
    'fields': [
        AdsInsights.Field.actions,
        AdsInsights.Field.video_avg_pct_watched_actions,
        AdsInsights.Field.video_complete_watched_actions,
    ],
}

stats = account.get_insights(params=params)
print(stats)
APINodeList<AdsInsights> adsInsightss = new AdAccount(act_<AD_ACCOUNT_ID>, context).getInsights()
  .setActionBreakdowns("action_video_type")
  .setDatePreset(AdsInsights.EnumDatePreset.VALUE_LAST_30_DAYS)
  .requestField("actions")
  .requestField("video_avg_pct_watched_actions")
  .requestField("video_complete_watched_actions")
  .execute();
curl -G \
  -d 'action_breakdowns=action_video_type' \
  -d 'date_preset=last_30_days' \
  -d 'fields=actions,video_avg_pct_watched_actions,video_complete_watched_actions' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.8/act_<AD_ACCOUNT_ID>/insights

La respuesta incluye objetos con action_type como video_view y contiene una clave action_video_type:

{
  "data": [
    {
      "actions": [
        ...
        {
          "action_type": "video_play", 
          "value": 9898
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "total", 
          "value": 921129
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "auto_play", 
          "value": 915971
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "click_to_play", 
          "value": 5158
        }
      ], 
      "video_avg_pct_watched_actions": [
        {
          "action_type": "video_view", 
          "action_video_type": "total", 
          "value": 60.59
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "auto_play", 
          "value": 60.47
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "click_to_play", 
          "value": 80.63
        }
      ], 
      "video_complete_watched_actions": [
        {
          "action_type": "video_view", 
          "action_video_type": "total", 
          "value": 156372
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "auto_play", 
          "value": 154015
        }, 
        {
          "action_type": "video_view", 
          "action_video_type": "click_to_play", 
          "value": 2357
        }
      ], 
      "date_start": "2014-12-26", 
      "date_stop": "2015-03-25"
    }
  ], 
  "paging": {
    "cursors": {
      "before": "MA==", 
      "after": "MA=="
    }
  }
}

Consulta la API de insights de anuncios.

Obtén más espacio para contenido en la sección de noticias y dirige a las personas a tu sitio web o aplicación para móviles para que realicen una conversión. Puedes crear un anuncio por secuencia de dos formas:

Los anuncios por secuencia no son compatibles con Facebook Stories.

Crear en línea

Crea una publicación de la página del anuncio por secuencia mientras creas el contenido del anuncio. Especifica el contenido de la publicación de la página en object_story_spec. De este modo, se crea una publicación de la página oculta desde adcreatives. Consulta la documentación Contenido del anuncio. Por ejemplo:

use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdCreativeLinkDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeLinkDataChildAttachmentFields;
use FacebookAds\Object\AdCreativeLinkDataChildAttachment;
use FacebookAds\Object\AdCreativeLinkData;
use FacebookAds\Object\AdCreativeObjectStorySpec;

$product1 = (new AdCreativeLinkDataChildAttachment())->setData(array(
  AdCreativeLinkDataChildAttachmentFields::LINK =>
    'https://www.link.com/product1',
  AdCreativeLinkDataChildAttachmentFields::NAME => 'Product 1',
  AdCreativeLinkDataChildAttachmentFields::DESCRIPTION => '$8.99',
  AdCreativeLinkDataChildAttachmentFields::IMAGE_HASH => '<IMAGE_HASH>',
  AdCreativeLinkDataChildAttachmentFields::VIDEO_ID => '<VIDEO_ID>',
));

$product2 = (new AdCreativeLinkDataChildAttachment())->setData(array(
  AdCreativeLinkDataChildAttachmentFields::LINK =>
    'https://www.link.com/product2',
  AdCreativeLinkDataChildAttachmentFields::NAME => 'Product 2',
  AdCreativeLinkDataChildAttachmentFields::DESCRIPTION => '$9.99',
  AdCreativeLinkDataChildAttachmentFields::IMAGE_HASH => '<IMAGE_HASH>',
  AdCreativeLinkDataChildAttachmentFields::VIDEO_ID => '<VIDEO_ID>',
));

$product3 = (new AdCreativeLinkDataChildAttachment())->setData(array(
  AdCreativeLinkDataChildAttachmentFields::LINK =>
    'https://www.link.com/product3',
  AdCreativeLinkDataChildAttachmentFields::NAME => 'Product 3',
  AdCreativeLinkDataChildAttachmentFields::DESCRIPTION => '$10.99',
  AdCreativeLinkDataChildAttachmentFields::IMAGE_HASH => '<IMAGE_HASH>',
));

$link_data = new AdCreativeLinkData();
$link_data->setData(array(
  AdCreativeLinkDataFields::LINK => '<URL>',
  AdCreativeLinkDataFields::CHILD_ATTACHMENTS => array(
    $product1, $product2, $product3,
  ),
));

$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
  AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
  AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));

$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->setData(array(
  AdCreativeFields::NAME => 'Sample Creative',
  AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
));

$creative->create();
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativelinkdata import AdCreativeLinkData
from facebookads.adobjects.adcreativeobjectstoryspec \
    import AdCreativeObjectStorySpec
from facebookads.adobjects.adcreativelinkdatachildattachment \
    import AdCreativeLinkDataChildAttachment

product1 = AdCreativeLinkDataChildAttachment()
product1[AdCreativeLinkDataChildAttachment.Field.link] = '<URL>' + '/product1'
product1[AdCreativeLinkDataChildAttachment.Field.name] = 'Product 1'
product1[AdCreativeLinkDataChildAttachment.Field.description] = '$8.99'
product1[AdCreativeLinkDataChildAttachment.Field.image_hash] = '<IMAGE_HASH>'
product1[AdCreativeLinkDataChildAttachment.Field.video_id] = '<VIDEO_ID>'

product2 = AdCreativeLinkDataChildAttachment()
product2[AdCreativeLinkDataChildAttachment.Field.link] = '<URL>' + '/product2'
product2[AdCreativeLinkDataChildAttachment.Field.name] = 'Product 2'
product2[AdCreativeLinkDataChildAttachment.Field.description] = '$9.99'
product2[AdCreativeLinkDataChildAttachment.Field.image_hash] = '<IMAGE_HASH>'

product3 = AdCreativeLinkDataChildAttachment()
product3[AdCreativeLinkDataChildAttachment.Field.link] = '<URL>' + '/product3'
product3[AdCreativeLinkDataChildAttachment.Field.name] = 'Product 3'
product3[AdCreativeLinkDataChildAttachment.Field.description] = '$10.99'
product3[AdCreativeLinkDataChildAttachment.Field.image_hash] = '<IMAGE_HASH>'

link = AdCreativeLinkData()
link[link.Field.link] = '<URL>'
link[link.Field.child_attachments] = [product1, product2, product3]

story = AdCreativeObjectStorySpec()
story[story.Field.page_id] = <PAGE_ID>
story[story.Field.link_data] = link

creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'MPA Creative'
creative[AdCreative.Field.object_story_spec] = story
creative.remote_create()
print(creative)
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
  .setName("Sample Creative")
  .setObjectStorySpec(
    new AdCreativeObjectStorySpec()
      .setFieldLinkData(
        new AdCreativeLinkData()
          .setFieldCaption("My caption")
          .setFieldChildAttachments(Arrays.asList(
            new AdCreativeLinkDataChildAttachment()
              .setFieldDescription("$8.99")
              .setFieldImageHash(<IMAGE_HASH>)
              .setFieldLink("https://www.link.com/product1")
              .setFieldName("Product 1")
              .setFieldVideoId(<VIDEO_ID>)
          , 
            new AdCreativeLinkDataChildAttachment()
              .setFieldDescription("$9.99")
              .setFieldImageHash(<IMAGE_HASH>)
              .setFieldLink("https://www.link.com/product2")
              .setFieldName("Product 2")
              .setFieldVideoId(<VIDEO_ID>)
          , 
            new AdCreativeLinkDataChildAttachment()
              .setFieldDescription("$10.99")
              .setFieldImageHash(<IMAGE_HASH>)
              .setFieldLink("https://www.link.com/product3")
              .setFieldName("Product 3")
          ))
          .setFieldLink(<URL>)
      )
      .setFieldPageId(<PAGE_ID>)
  )
  .execute();
String ad_creative_id = adCreative.getId();
curl \
  -F 'name=Sample Creative' \
  -F 'object_story_spec={ 
    "link_data": { 
      "child_attachments": [ 
        { 
          "description": "$8.99", 
          "image_hash": "<IMAGE_HASH>", 
          "link": "https:\/\/www.link.com\/product1", 
          "name": "Product 1", 
          "video_id": "<VIDEO_ID>" 
        }, 
        { 
          "description": "$9.99", 
          "image_hash": "<IMAGE_HASH>", 
          "link": "https:\/\/www.link.com\/product2", 
          "name": "Product 2", 
          "video_id": "<VIDEO_ID>" 
        }, 
        { 
          "description": "$10.99", 
          "image_hash": "<IMAGE_HASH>", 
          "link": "https:\/\/www.link.com\/product3", 
          "name": "Product 3" 
        } 
      ], 
      "link": "<URL>" 
    }, 
    "page_id": "<PAGE_ID>" 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives

La respuesta es un identificador de contenido:

{"id":"<CREATIVE_ID>"}

Crear la publicación y, luego, el anuncio

Crea una publicación de la página oculta. child_attachments es una matriz de objetos de enlace. En cada objeto de enlace, picture, name y description son opcionales. Para publicarlos en nombre de la página, necesitas el identificador de acceso a esta.

curl -X GET \ -d 'message="Browse our latest products"' \ -d 'published=0' \ -d 'child_attachments=[ { "link": "{app-store-url}", "name": "Product 1", "description": "$4.99", "image_hash": "{image-hash}" }, { "link": "{app-store-url}", "name": "Product 2", "description": "$4.99", "image_hash": "{image-hash}" }, { "link": "{app-store-url}", "name": "Product 3", "description": "$4.99", "image_hash": "{image-hash}" }, { "link": "{app-store-url}", "name": "Product 4", "description": "$4.99", "image_hash": "{image-hash}" } ]' \ -d 'caption="WWW.EXAMPLE.COM"' \ -d 'link="http://www.example.com/products"' \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v19.0/{page-id}/posts
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const Page = bizSdk.Page; const PagePost = bizSdk.PagePost; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<PAGE_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'message' : 'Browse our latest products', 'published' : '0', 'child_attachments' : [{'link':'<link>','name':'Product 1','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 2','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 3','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 4','description':'$4.99','image_hash':'<imageHash>'}], 'caption' : 'WWW.EXAMPLE.COM', 'link' : 'http://www.example.com/products', }; const postss = (new Page(id)).getPosts( fields, params ); logApiCallResult('postss api call complete.', postss);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\Page; use FacebookAds\Object\PagePost; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<PAGE_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'message' => 'Browse our latest products', 'published' => '0', 'child_attachments' => array(array('link' => '<link>','name' => 'Product 1','description' => '$4.99','image_hash' => '<imageHash>'),array('link' => '<link>','name' => 'Product 2','description' => '$4.99','image_hash' => '<imageHash>'),array('link' => '<link>','name' => 'Product 3','description' => '$4.99','image_hash' => '<imageHash>'),array('link' => '<link>','name' => 'Product 4','description' => '$4.99','image_hash' => '<imageHash>')), 'caption' => 'WWW.EXAMPLE.COM', 'link' => 'http://www.example.com/products', ); echo json_encode((new Page($id))->getPosts( $fields, $params )->getResponse()->getContent(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.page import Page from facebook_business.adobjects.pagepost import PagePost from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<PAGE_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'message': 'Browse our latest products', 'published': '0', 'child_attachments': [{'link':'<link>','name':'Product 1','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 2','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 3','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 4','description':'$4.99','image_hash':'<imageHash>'}], 'caption': 'WWW.EXAMPLE.COM', 'link': 'http://www.example.com/products', } print Page(id).get_posts( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<PAGE_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new Page(id, context).getPosts() .setParam(\"message\", \"Browse our latest products\") .setParam(\"published\", \"0\") .setParam(\"child_attachments\", \"[{\\"link\\":\\"<link>\\",\\"name\\":\\"Product 1\\",\\"description\\":\\"$4.99\\",\\"image_hash\\":\\"<imageHash>\\"},{\\"link\\":\\"<link>\\",\\"name\\":\\"Product 2\\",\\"description\\":\\"$4.99\\",\\"image_hash\\":\\"<imageHash>\\"},{\\"link\\":\\"<link>\\",\\"name\\":\\"Product 3\\",\\"description\\":\\"$4.99\\",\\"image_hash\\":\\"<imageHash>\\"},{\\"link\\":\\"<link>\\",\\"name\\":\\"Product 4\\",\\"description\\":\\"$4.99\\",\\"image_hash\\":\\"<imageHash>\\"}]\") .setParam(\"caption\", \"WWW.EXAMPLE.COM\") .setParam(\"link\", \"http://www.example.com/products\") .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<PAGE_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end page = FacebookAds::Page.get(id) postss = page.posts({ fields: { }, message: 'Browse our latest products', published: '0', child_attachments: [{'link':'<link>','name':'Product 1','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 2','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 3','description':'$4.99','image_hash':'<imageHash>'},{'link':'<link>','name':'Product 4','description':'$4.99','image_hash':'<imageHash>'}], caption: 'WWW.EXAMPLE.COM', link: 'http://www.example.com/products', })

Después, proporciona el contenido del anuncio con la publicación de la página oculta. Utiliza el valor de id para object_story_id en el contenido del anuncio.

curl -X POST \ -F 'object_story_id="<PAGE_ID>_<POST_ID>"' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/adcreatives
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const AdCreative = bizSdk.AdCreative; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'object_story_id' : '<pageID>_<postID>', }; const adcreatives = (new AdAccount(id)).createAdCreative( fields, params ); logApiCallResult('adcreatives api call complete.', adcreatives);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdCreative; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'object_story_id' => '<pageID>_<postID>', ); echo json_encode((new AdAccount($id))->createAdCreative( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adcreative import AdCreative from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'object_story_id': '<pageID>_<postID>', } print AdAccount(id).create_ad_creative( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).createAdCreative() .setObjectStoryId(\"<pageID>_<postID>\") .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) adcreatives = ad_account.adcreatives.create({ object_story_id: '<pageID>_<postID>', })

Crear el anuncio por secuencia con vídeo

Los anuncios por secuencia con vídeo pueden tener texto en el archivo adjunto dependiente para personalizar la URL de visualización en la pantalla final:

"child_attachments": [
 {
   "link": "https://www.facebookmarketingdevelopers.com/",
   "name": "Facebook Marketing Developers",
   "description": "Facebook Marketing Developers",
   "call_to_action": {
     "type": "APPLY_NOW",
     "value": {
      "link_title": "Facebook Marketing Developers"
     }
   },
   "video_id": "123",
   "caption": "mycustomlinkcaption.com"
  },
]

Para obtener detalles de los archivos adjuntos dependientes, utiliza el identificador y llama a la API Graph, Vídeo, Referencia.

Crear el anuncio sobre una aplicación para móviles

Limitaciones:

  • Los anuncios sobre aplicaciones para móviles por secuencia solo admiten una aplicación.
  • Requieren tres imágenes como mínimo, frente a las dos que precisan el resto de los anuncios por secuencia.
  • Los anuncios sobre aplicaciones para móviles por secuencia deben incluir una llamada a la acción.
  • La imagen final, que, normalmente, muestra la foto del perfil de la página, no se muestra en los anuncios sobre una aplicación para móviles por secuencia. Ten en cuenta que debes especificar el mismo enlace a la tienda de aplicaciones en cada child_attachment. No tienes que volver a especificar el enlace en call_to_action:{'value':{'link':... }}}.

Por ejemplo, para crear un anuncio por secuencia para obtener descargas de aplicaciones para móviles:

curl -X POST \
  -F 'name="Carousel app ad"' \
  -F 'object_story_spec={
       "page_id": "<PAGE_ID>",
       "link_data": {
         "message": "My message",
         "link": "http://www.example.com/appstoreurl",
         "caption": "WWW.ITUNES.COM",
         "name": "The link name",
         "description": "The link description",
         "child_attachments": [
           {
             "link": "http://www.example.com/appstoreurl",
             "image_hash": "<IMAGE_HASH>",
             "call_to_action": {
               "type": "USE_MOBILE_APP",
               "value": {
                 "app_link": "<DEEP_LINK>"
               }
             }
           },
           {
             "link": "http://www.example.com/appstoreurl",
             "image_hash": "<IMAGE_HASH>",
             "call_to_action": {
               "type": "USE_MOBILE_APP",
               "value": {
                 "app_link": "<DEEP_LINK>"
               }
             }
           },
           {
             "link": "http://www.example.com/appstoreurl",
             "image_hash": "<IMAGE_HASH>",
             "call_to_action": {
               "type": "USE_MOBILE_APP",
               "value": {
                 "app_link": "<DEEP_LINK>"
               }
             }
           },
           {
             "link": "http://www.example.com/appstoreurl",
             "image_hash": "<IMAGE_HASH>",
             "call_to_action": {
               "type": "USE_MOBILE_APP",
               "value": {
                 "app_link": "<DEEP_LINK>"
               }
             }
           }
         ],
         "multi_share_optimized": true
       }
     }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/adcreatives

Solo puedes realizar una publicación como la página de Facebook asociada con la aplicación para móviles y deberás usar un identificador de acceso a esta.

$child_attachments = array();

for ($i = 0; $i <= 3; $i++) {
  $child_attachments[] = array(
    'link' => '<APP_STORE_URL>',
    'image_hash' => '<IMAGE_HASH_I>',
    'call_to_action' => array(
      'type' => 'USE_MOBILE_APP',
      'value' => array(
        'app_link' => '<DEEP_LINK_I>',
        'link_title' => '<LINK_TITLE_I>',
      ),
    ),
  );
}

$params = array(
  'message' => 'My description',
  'link' => '<APP_STORE_URL>',
  'caption' => 'WWW.ITUNES.COM',
  'child_attachments' => $child_attachments,
  'multi_share_optimized' => true,
);

$data = Api::instance()->call(
  '/'.'<PAGE_ID>'.'/feed',
  RequestInterface::METHOD_POST,
  $params)->getContent();
from facebookads import FacebookAdsApi
from facebookads.adobjects.adcreativelinkdatachildattachment \
    import AdCreativeLinkDataChildAttachment

child_attachments = list()

for i in range(3):
    child_attachments.append({
        AdCreativeLinkDataChildAttachment.Field.link: '<APP_STORE_URL>',
        AdCreativeLinkDataChildAttachment.Field.image_hash: '<IMAGE_HASH>',
        AdCreativeLinkDataChildAttachment.Field.call_to_action: {
            'type': 'USE_MOBILE_APP',
            'value': {
                'app_link': '<DEEP_LINK_I>',
                'link_title': '<LINK_TITLE_I>',
            },
        },
    })

params = {
    'message': 'My description',
    'link': '<APP_STORE_URL>',
    'caption': 'WWW.ITUNES.COM',
    'child_attachments': child_attachments,
    'multi_share_optimized': True,
}

data = FacebookAdsApi.get_default_api().\
    call('POST', (<PAGE_ID>, 'feed'), params)
curl \
  -F 'message=My description' \
  -F 'link=<APP_STORE_URL>' \
  -F 'caption=WWW.ITUNES.COM' \
  -F 'child_attachments=[ 
    { 
      "link": "<APP_STORE_URL>", 
      "image_hash": "<IMAGE_HASH_I>", 
      "call_to_action": { 
        "type": "USE_MOBILE_APP", 
        "value": {"app_link":"<DEEP_LINK_I>","link_title":"<LINK_TITLE_I>"} 
      } 
    }, 
    { 
      "link": "<APP_STORE_URL>", 
      "image_hash": "<IMAGE_HASH_I>", 
      "call_to_action": { 
        "type": "USE_MOBILE_APP", 
        "value": {"app_link":"<DEEP_LINK_I>","link_title":"<LINK_TITLE_I>"} 
      } 
    }, 
    { 
      "link": "<APP_STORE_URL>", 
      "image_hash": "<IMAGE_HASH_I>", 
      "call_to_action": { 
        "type": "USE_MOBILE_APP", 
        "value": {"app_link":"<DEEP_LINK_I>","link_title":"<LINK_TITLE_I>"} 
      } 
    }, 
    { 
      "link": "<APP_STORE_URL>", 
      "image_hash": "<IMAGE_HASH_I>", 
      "call_to_action": { 
        "type": "USE_MOBILE_APP", 
        "value": {"app_link":"<DEEP_LINK_I>","link_title":"<LINK_TITLE_I>"} 
      } 
    } 
  ]' \
  -F 'multi_share_optimized=1' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<PAGE_ID>/feed

Utiliza id desde la respuesta para crear el contenido del anuncio:

curl -X POST \ -F 'object_story_id="<PAGE_ID>_<POST_ID>"' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/adcreatives
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const AdCreative = bizSdk.AdCreative; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'object_story_id' : '<pageID>_<postID>', }; const adcreatives = (new AdAccount(id)).createAdCreative( fields, params ); logApiCallResult('adcreatives api call complete.', adcreatives);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdCreative; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'object_story_id' => '<pageID>_<postID>', ); echo json_encode((new AdAccount($id))->createAdCreative( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adcreative import AdCreative from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'object_story_id': '<pageID>_<postID>', } print AdAccount(id).create_ad_creative( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).createAdCreative() .setObjectStoryId(\"<pageID>_<postID>\") .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) adcreatives = ad_account.adcreatives.create({ object_story_id: '<pageID>_<postID>', })

Especificaciones sobre los campos

Este es un anuncio por secuencia en iOS que ilustra el uso de los campos descritos.

Nombre Descripción

child_attachments

Tipo: objeto

Se precisa una matriz de dos a diez elementos de enlace para los anuncios por secuencia. Debes utilizar como mínimo 3 objetos para obtener un rendimiento óptimo; 2 objetos sirven para activar las integraciones ligeras y, si solo utilizas 2, es posible que obtengas resultados de la campaña poco óptimos.

child_attachments.link

Tipo: cadena

URL del enlace o de la tienda de aplicaciones adjunta a la publicación. Obligatorio.

child_attachments.picture

Tipo: URL

Imagen de vista previa asociada al enlace. Usa una relación de aspecto de 1:1 y un tamaño mínimo de 458 x 458 píxeles para obtener una mejor visualización. Se debe especificar picture o image_hash.

child_attachments.image_hash

Tipo: cadena

Hash de la imagen de vista previa asociada con el enlace de tu biblioteca de imágenes. Usa una relación de aspecto de 1:1 y un tamaño mínimo de 458 x 458 píxeles para obtener una visualización óptima. Se debe especificar picture o image_hash.

child_attachments.name

Tipo: cadena

Título de la vista previa del enlace. Si no se especifica, se usará el título de la página vinculada. Normalmente, se trunca después de 35 caracteres. Debes establecer un valor de name único, ya que las interfaces de Facebook muestran las acciones que notifica name.

child_attachments.description

Tipo: cadena

Puede ser un precio, un descuento o un dominio de sitio web. Si no se especifica, se extrae y se usa el contenido de la página vinculada. Normalmente, se trunca después de 30 caracteres.

child_attachments.call_to_action

Tipo: objeto

Llamada a la acción opcional. Consulta la documentación sobre la llamada a la acción. No tienes que especificar el enlace en call_to_action:{'value':{'link':... }}}.

child_attachments.video_id

Tipo: cadena

Identificador del vídeo del anuncio. Se puede usar en cualquier elemento secundario. Si se especifica, también se debe establecer image_hash o picture.

message

Tipo: cadena

Cuerpo principal de la publicación, denominado también “mensaje de estado”.

link

Tipo: cadena

URL de un enlace para “Ver más”. Obligatorio.

caption

Tipo: cadena

URL de visualización en el enlace “Ver más”. No se aplica en los anuncios sobre una aplicación para móviles por secuencia.

multi_share_optimized

Tipo: booleano

Si se establece en true, selecciona y ordena las imágenes y los enlaces automáticamente. De lo contrario, se usa el orden original de los elementos secundarios. El valor predeterminado es true.

multi_share_end_card

Tipo: booleano

Si se establece en false, elimina la imagen final, que muestra el icono de la página. El valor predeterminado es true.

Estadísticas de anuncios por producto

Agrupa las acciones de los anuncios por secuencia según cada producto con actions_breakdown=['action_carousel_card_id', 'action_carousel_card_name']. Cada child_attachment tiene un identificador de tarjeta distinto. action_carousel_card_id y action_carousel_card_name solo son para los anuncios por secuencia.

Obtén las siguientes estadísticas para cada imagen:

  • website_ctr: disponible cuando se especifica fields=['website_ctr']
  • app_install, app_use, apps.uses, credit_spent, mobile_app_install, tab_view, link_click, mobile_app_install, app_custom_event.*, offsite_conversion.*: disponible cuando se especifica fields=['actions']. No hay otras acciones disponibles con desglose por imagen.
use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdsInsightsFields;
use FacebookAds\Object\Values\AdsInsightsActionBreakdownsValues;
use FacebookAds\Object\Values\AdsInsightsBreakdownsValues;
use FacebookAds\Object\Values\AdsInsightsLevelValues;
use FacebookAds\Object\Values\AdsInsightsDatePresetValues;
use FacebookAds\Object\Values\InsightsIncrements;
use FacebookAds\Object\Values\InsightsOperators;

$account = new AdAccount('act_<AD_ACCOUNT_ID>');

$params = array(
  'action_breakdowns' => array(
    AdsInsightsActionBreakdownsValues::ACTION_TYPE,
    AdsInsightsActionBreakdownsValues::ACTION_CAROUSEL_CARD_ID,
  ),
  'level' => AdsInsightsLevelValues::AD,
  'date_preset' => AdsInsightsDatePresetValues::LAST_30D,
  'time_increment' => InsightsIncrements::ALL_DAYS,
  'breakdowns' => AdsInsightsBreakdownsValues::PLACEMENT,
  'filtering' => array(
    array(
      'field' => 'action_type',
      'operator' => InsightsOperators::IN,
      'value' => array('link_click'),
    ),
  ),
);

$fields = array(
  AdsInsightsFields::IMPRESSIONS,
  AdsInsightsFields::INLINE_LINK_CLICKS,
  AdsInsightsFields::ACTIONS,
  AdsInsightsFields::WEBSITE_CTR,
);

$stats = $account->getInsights($fields, $params);
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adsinsights import AdsInsights


account = AdAccount('act_<AD_ACCOUNT_ID>')

params = {
    'action_breakdowns': [
        AdsInsights.ActionBreakdowns.action_type,
        AdsInsights.ActionBreakdowns.action_carousel_card_id,
    ],
    'fields': [
        AdsInsights.Field.impressions,
        AdsInsights.Field.unique_clicks,
        AdsInsights.Field.actions,
        AdsInsights.Field.website_ctr,
    ],
    'level': AdsInsights.Level.ad,
    'date_preset': AdsInsights.DatePreset.last_30_days,
    'time_increment': 'all_days',
    'breakdowns': AdsInsights.Breakdowns.placement,
    'filtering': [
        {
            'field': 'action_type',
            'operator': 'IN',
            'value': ['link_click'],
        },
    ],
}

stats = account.get_insights(params=params)
print(stats)
APINodeList<AdsInsights> adsInsightss = new AdAccount(act_<AD_ACCOUNT_ID>, context).getInsights()
  .setActionBreakdowns("[\"action_type\",\"action_carousel_card_id\"]")
  .setLevel(AdsInsights.EnumLevel.VALUE_AD)
  .setDatePreset(AdsInsights.EnumDatePreset.VALUE_LAST_30_DAYS)
  .setTimeIncrement("all_days")
  .setBreakdowns("placement")
  .setFiltering("[{\"field\":\"action_type\",\"operator\":\"IN\",\"value\":[\"link_click\"]}]")
  .requestField("impressions")
  .requestField("inline_link_clicks")
  .requestField("actions")
  .requestField("website_ctr")
  .execute();
curl -G \
  -d 'action_breakdowns=["action_type","action_carousel_card_id"]' \
  -d 'level=ad' \
  -d 'date_preset=last_30_days' \
  -d 'time_increment=all_days' \
  -d 'breakdowns=placement' \
  --data-urlencode 'filtering=[ 
    { 
      "field": "action_type", 
      "operator": "IN", 
      "value": ["link_click"] 
    } 
  ]' \
  -d 'fields=impressions,inline_link_clicks,actions,website_ctr' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.8/act_<AD_ACCOUNT_ID>/insights

Respuesta:

{
...
   "website_ctr": [
      {
         "action_carousel_card_id": "1",
         "action_type": "link_click",
         "value": 51.401869158878
      },
      {
         "action_carousel_card_id": "2",
         "action_type": "link_click",
         "value": 50.980392156863
      }
   ],
   "placement": "mobile_feed",
   "date_start": "2015-05-25",
   "date_stop": "2015-05-28"
}

También puedes solicitar cost_per_action_type para obtener un desglose de los costes según el tipo de acción:

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdsInsightsFields;
use FacebookAds\Object\Values\AdsInsightsActionBreakdownsValues;
use FacebookAds\Object\Values\AdsInsightsBreakdownsValues;
use FacebookAds\Object\Values\AdsInsightsLevelValues;

$account = new AdAccount('act_<AD_ACCOUNT_ID>');

$params = array(
  'action_breakdowns' => array(
    AdsInsightsActionBreakdownsValues::ACTION_TYPE,
    AdsInsightsActionBreakdownsValues::ACTION_CAROUSEL_CARD_NAME,
  ),
  'level' => AdsInsightsLevelValues::AD,
  'breakdowns' => AdsInsightsBreakdownsValues::PLACEMENT,
);

$fields = array(
  AdsInsightsFields::IMPRESSIONS,
  AdsInsightsFields::CAMPAIGN_NAME,
  AdsInsightsFields::COST_PER_ACTION_TYPE,
);

$stats = $account->getInsights($fields, $params);
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adsinsights import AdsInsights

account = AdAccount('act_<AD_ACCOUNT_ID>')

params = {
    'action_breakdowns': [
        AdsInsights.ActionBreakdowns.action_type,
        AdsInsights.ActionBreakdowns.action_carousel_card_name,
    ],
    'fields': [
        AdsInsights.Field.impressions,
        AdsInsights.Field.campaign_name,
        AdsInsights.Field.cost_per_action_type,
    ],
    'level': AdsInsights.Level.ad,
}

stats = account.get_insights(params=params)
print(stats)
APINodeList<AdsInsights> adsInsightss = new AdAccount(act_<AD_ACCOUNT_ID>, context).getInsights()
  .setActionBreakdowns("[\"action_type\",\"action_carousel_card_name\"]")
  .setLevel(AdsInsights.EnumLevel.VALUE_AD)
  .setBreakdowns("placement")
  .requestField("impressions")
  .requestField("campaign_name")
  .requestField("cost_per_action_type")
  .execute();
curl -G \
  -d 'action_breakdowns=["action_type","action_carousel_card_name"]' \
  -d 'level=ad' \
  -d 'breakdowns=placement' \
  -d 'fields=impressions,campaign_name,cost_per_action_type' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.8/act_<AD_ACCOUNT_ID>/insights

Ejemplo de respuesta:

{
   "data": [
      {
         "impressions": "1862555",
         "campaign_name": "My Campaign",
         "cost_per_action_type": [
            {
               "action_carousel_card_name": "My Carousel Card 1",
               "action_type": "app_custom_event.fb_mobile_activate_app",
               "value": 0.093347346315861
            },
            {
               "action_carousel_card_name": "My Carousel Card 2",
               "action_type": "app_custom_event.fb_mobile_activate_app",
               "value": 0.38324089579301
            },
            ...
         ],
      }
   ]
}
  • Las métricas del desglose por secuencia de action_report_time=impression son imprecisas antes del 20 de junio de 2015.
  • Las métricas de desglose por secuencia de action_report_time=conversion son imprecisas antes del 20 de julio de 2015.

Ubicaciones

Si solo seleccionas right_hand_column como ubicación, solo puedes utilizar un vídeo o un formato por secuencia en tu grupo de anuncios. No admitimos el formato de vídeo con una sola ubicación right_hand_column seleccionada. Consulta Ubicación y segmentación avanzadas.

Por ejemplo, crea un conjunto de anuncios con right_hand_column como tu única ubicación:

curl \
  -F 'name=RHS only Ad Set' \
  -F 'campaign_id=<CAMPAIGN_ID>' \
  -F 'daily_budget=500' \
  -F 'start_time=2017-11-21T15:41:36+0000' \
  -F 'end_time=2017-11-28T15:41:36+0000' \
  -F 'billing_event=IMPRESSIONS' \
  -F 'optimization_goal=LINK_CLICKS' \
  -F 'bid_amount=100' \
  -F 'targeting={ 
    "device_platforms": ["mobile"], 
    "geo_locations": {"countries":["US"]}, 
    "publisher_platforms": ["facebook"] ,
    "facebook_positions": ["right_hand_column"] ,  
  }' \
  -F 'status=PAUSED' \
  -F 'access_token=ACCESS_TOKEN' \
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adsets
}

Proporciona el contenido del anuncio con vídeo:

curl \
  -F 'name=Sample Creative' \
  -F 'object_story_spec={ 
    "page_id": "<PAGE_ID>", 
    "video_data": {"image_url":"THUMBNAIL_URL","video_id":"VIDEO_ID"} 
  }' \
  -F 'access_token=ACCESS_TOKEN' \
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adcreatives
}

O bien proporciona un formato de anuncio de Canvas para el contenido del anuncio:

curl \
  -F 'image_hash=IMAGE_HASH' \
  -F 'object_story_spec={ 
    "link_data": { 
      "call_to_action": {"type":"LEARN_MORE"}, 
      "image_hash": "IMAGE_HASH", 
      "link": "CANVAS_LINK", 
      "name": "Creative message" 
    }, 
    "page_id": "PAGE_ID" 
  }' \
  -F 'access_token=ACCESS_TOKEN' \
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adcreatives
}

Con el código siguiente, se intenta crear un anuncio con el conjunto de anuncios y el contenido del anuncio:

curl \
  -F 'name=My Ad' \
  -F 'adset_id=<AD_SET_ID>' \
  -F 'creative={"creative_id":"CREATIVE_ID"}' \
  -F 'status=ACTIVE' \
  -F 'access_token=ACCESS_TOKEN' \
  https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/ads
    </c:code>
    
    }

Si obtienes un código de error, deberás proporcionar un contenido compatible o cambiar la segmentación.