目錄和訊號品質

我們提供兩種選項,可讓您針對不同高效速成+ 目錄廣告素材的品質和效能,取得相關的意見回饋:

有關目錄像素和應用程式事件的意見回饋

若要找出您的像素或應用程式安裝所發生的問題,您可以檢查有關從不同像素、應用程式和裝置所接收的已配對和未配對事件的彙整統計資料。

查詢事件 API,以取得源自於事件來源(連結至您的目錄)的事件相關統計資料。如需詳細資料,請參閱事件 API 參考資料

事件統計資料

您可以在目錄層級取得此資訊:

curl -X GET \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v19.0/<PRODUCT_CATALOG_ID>/event_stats
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const ProductCatalog = bizSdk.ProductCatalog; const ProductEventStat = bizSdk.ProductEventStat; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<PRODUCT_CATALOG_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 = { }; const event_statss = (new ProductCatalog(id)).getEventStats( fields, params ); logApiCallResult('event_statss api call complete.', event_statss);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\ProductCatalog; use FacebookAds\Object\ProductEventStat; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<PRODUCT_CATALOG_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( ); echo json_encode((new ProductCatalog($id))->getEventStats( $fields, $params )->getResponse()->getContent(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.productcatalog import ProductCatalog from facebook_business.adobjects.producteventstat import ProductEventStat from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<PRODUCT_CATALOG_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { } print ProductCatalog(id).get_event_stats( 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 = \"<PRODUCT_CATALOG_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new ProductCatalog(id, context).getEventStats() .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<PRODUCT_CATALOG_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end product_catalog = FacebookAds::ProductCatalog.get(id) event_statss = product_catalog.event_stats({ fields: { }, })

這會傳回一個元素陣列,上個月內的每個事件類型、來源和日期各一個元素:

{
  "data": [
    {
      "date_start": "2017-03-16",
      "date_stop": "2017-03-16",
      "event": "AddToCart",
      "event_source": {
        "id": "<PIXEL_ID>",
        "source_type": "PIXEL"
      },
      "total_matched_content_ids": 1086,
      "total_content_ids_matched_other_catalogs": 10024,
      "total_unmatched_content_ids": 13024,
      "unique_matched_content_ids": 285,
      "unique_content_ids_matched_other_catalogs": 102,
      "unique_unmatched_content_ids": 2132
    },
    {
      "date_start": "2017-03-16",
      "date_stop": "2017-03-16",
      "event": "ViewContent",
      "event_source": {
        "id": "<APP_ID>",
        "source_type": "APP"
      },
      "total_matched_content_ids": 1007,
      "total_content_ids_matched_other_catalogs": 504,
      "total_unmatched_content_ids": 20206,
      "unique_matched_content_ids": 507,
      "unique_content_ids_matched_other_catalogs": 402,
      "unique_unmatched_content_ids": 8037
    },
    ...
  ]
}

針對每個事件類型、來源和日期所傳回的欄位為:

計數 說明

total_matched_content_ids

內容編號的總數量,來自與目錄中商品相符的已接收事件。此計數並不會刪除整個內容編號內重複的項目。

total_content_ids_matched_other_catalogs

內容編號的總數量,來自與其他目錄(已與給定像素或應用程式相關聯)中商品相符的已接收事件。此計數並不會刪除整個內容編號內重複的項目。

total_unmatched_content_ids

內容編號的總數量,來自未與目錄中商品相符的已接收事件。此計數並不會刪除整個內容編號內重複的項目。

unique_matched_content_ids

不重複內容編號的數量,來自與目錄中商品相符的已接收事件。

unique_content_ids_matched_other_catalogs

不重複內容編號的數量,來自與另一個目錄(已與觸發事件的指定像素或應用程式相關聯)中商品相符的已接收事件。

unique_unmatched_content_ids

不重複內容編號的數量,來自未與目錄中商品相符的已接收事件。

裝置類型資料解析

傳送 device_type 解析結果:

use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;

$data = Api::instance()->call(
  '/' . <CATALOG_ID> . '/event_stats',
  RequestInterface::METHOD_GET,
  array(
    'breakdowns' => array('device_type'),
  ))->getContent();
curl -G \
  -d 'breakdowns=["device_type"]' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<CATALOG_ID>/event_stats

這會傳回按發生事件的裝置分組的結果。例如,desktopmobile_iphonemobile_android_phone 等等:

{
  "data": [
    {
      "date_start": "2017-03-10",
      "date_stop": "2017-03-10",
      "event": "AddToCart",
      "event_source": {
        "id": "<PIXEL_ID>",
        "source_type": "PIXEL"
      },
      "device_type": "desktop",
      "total_matched_content_ids": 282,
      "total_content_ids_matched_other_catalogs": 524,
      "total_unmatched_content_ids": 4965,
      "unique_matched_content_ids": 102,
      "unique_content_ids_matched_other_catalogs": 402,
      "unique_unmatched_content_ids": 1427
    },
    ...
  ]
}

有關像素和應用程式事件的意見回饋

範例 - 使用檢查可驗證像素所傳送的事件是否有任何問題。

use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;

$data = Api::instance()->call(
  '/' . <PIXEL_ID> . '/da_checks',
  RequestInterface::METHOD_GET)->getContent();
curl -G \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<PIXEL_ID>/da_checks

範例 - 回應

{
  "data": [
    {
      "description": "Pixel hasn't sent some or any events for Advantage+ catalog ads (ex: ViewContent, AddToCart, Purchase) at least once in the last 24 hours.",
      "key": "pixel_missing_dpa_event",
      "result": "failed",
      "title": "Pixel is not sending DPA events"
    },
    {
      "description": "Pixel events might be missing parameters some or all of the time.",
      "key": "pixel_missing_param_in_events",
      "result": "passed",
      "title": "Pixel missing parameter in DPA events"
    },
    {
      "action_uri": "https://www.facebook.com/ads/manage/pixels/?pixel_id=<PIXEL_ID>&amp;m2w=1",
      "description": "The number of pixel events has dropped to less than half of the weekly average.",
      "key": "pixel_decline",
      "result": "passed",
      "title": "Decline in number of pixel events"
    }
  ]
}

您可以使用下列檢查:

檢查 說明

pixel_missing_dpa_event

檢查此像素是否有遺漏的事件,如高效速成+ 目錄廣告中的定義。

pixel_missing_param_in_events

檢查是否有缺少強制性參數的事件,如動態廣告中的定義。

pixel_decline

檢查過去 24 小時內該像素收到的事件數量是否下降。

如需詳細資料,請參閱像素動態廣告檢查參考資料

result 欄位的可能值:

狀態 說明

通過

您的像素通過此檢查。

失敗

您的像素未通過此檢查。

無法使用

此檢查現在不適用於此像素。請稍後再試。

我們根據預設值傳回所有檢查,但您可指定所要執行的檢查,如下所示:

use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;

$data = Api::instance()->call(
  '/' . <PIXEL_ID> . '/da_checks',
  RequestInterface::METHOD_GET,
  array(
    'checks' => array(
      'pixel_decline',
      'pixel_missing_dpa_event',
      'pixel_missing_param_in_events',
      ),
  ))->getContent();
curl -G \
  --data-urlencode 'checks=[ 
    "pixel_decline", 
    "pixel_missing_dpa_event", 
    "pixel_missing_param_in_events" 
  ]' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<PIXEL_ID>/da_checks

針對應用程式事件

您可以驗證應用程式所傳送的事件是否有任何問題:

use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;

$data = Api::instance()->call(
  '/' . <APP_ID> . '/da_checks',
  RequestInterface::METHOD_GET)->getContent();
curl -G \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<APP_ID>/da_checks

回應範例:

{
  "data": [
    {
      "description": "App hasn't sent some or any events for dynamic ads (ex: ViewContent, AddToCart, Purchase)...",
      "key": "app_missing_dpa_event",
      "result": "failed",
      "title": "App is not sending DPA events"
    },
    {
      "description": "App events might be missing parameters some or all of the time.",
      "key": "app_missing_param_in_events",
      "result": "passed",
      "title": "App missing parameter in DPA events"
    }
  ]
}
檢查 說明

app_missing_dpa_event

檢查應用程式是否有缺少事件,如動態廣告中的定義。

app_missing_param_in_events

檢查是否有缺少強制性參數的事件,如動態廣告中的定義。

如需詳細資料,請參閱應用程式 DA 檢查參考資料

result 可能的傳回值:

狀態 說明

通過

您的應用程式通過此檢查。

失敗

您的應用程式未通過此檢查。

無法使用

此檢查現在不適用於此應用程式。請稍後再試。

您可要求特定檢查的值。我們根據預設值傳回所有值,但您可在要求中傳遞某些檢查,以指定所要執行的檢查項目:

use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;

$data = Api::instance()->call(
  '/' . <APP_ID> . '/da_checks',
  RequestInterface::METHOD_GET,
  array(
    'checks' => array('app_missing_dpa_event', 'app_missing_param_in_events'),
  ))->getContent();
curl -G \
  -d 'checks=["app_missing_dpa_event","app_missing_param_in_events"]' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<APP_ID>/da_checks