Skip to content
Last updated

Facebook Conversionsコネクタへの移行ガイド

パラメータ設定

Facebook Conversions エクスポート連携の設定は以下の通りです:

パラメータ名必須備考
pixel_idYesFacebook Pixel IDです。Facebook Event Managerで取得できます。Facebook Offlineデータソース経由で作成する必要があります。
access_tokenYesアクセストークンです。Facebook Business Managerから取得できます(詳細は Get Started - Conversions API - Documentation - Meta for Developers を参照してください)
test_event_codeNoテスト目的でのみ使用されます
pre_hashed_columnsNo事前にハッシュ化されたカラムのリストで、カンマ区切りで指定します
skip_invalidNo無効なレコードを処理する際にジョブをスキップするかどうかを制御するオプションパラメータです。

クエリフィールド名のマッピング

以下の表は、Facebook Offline Conversions エクスポート連携と Facebook Conversions 連携の間のクエリカラムのマッピングを示しています。

Facebook Offline Conversions(カラム名)Facebook Conversions(カラム名)データ型必須?備考
event_nameevent_namestringY
event_timeevent_timelongYイベント時間をミリ秒単位で指定し、過去7日以内に発生したものである必要があります。
currencycustom_data フィールドの属性に移動doubleN例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
valuecustom_data フィールドの属性に移動longN例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
content_typecustom_data フィールドの属性に移動stringNサポートされる値は:product または product_group 例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
contentscustom_data フィールドの属性に移動string (シリアライズされたJSONオブジェクト配列)N例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
custom_datacustom_datajson または string (オブジェクトはJSON文字列形式で、ダブルクォートをエスケープする必要があります)N例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
order_idcustom_data フィールドの属性に移動stringN例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
item_numbercustom_data フィールドの属性に新しいキー num_items として移動longN例: "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
data_processing_optionsdata_processing_optionsstringN
data_processing_options_countrydata_processing_options_countrylongN
data_processing_options_statedata_processing_options_statelongN
emailemstringNFacebook Offline Conversions 出力コネクタは複数のemailカラムをサポートできますが、Facebook Conversions 出力コネクタは1つのemailカラムのみサポートします
phonephstringNFacebook Offline Conversions 出力コネクタは複数のphoneカラムをサポートできますが、Facebook Conversions 出力コネクタは1つのphoneカラムのみサポートします
gengestringN
dobydbstringN3つのカラム(doby、dobm、dobd)を1つのカラムdbにマージします(Facebook Conversions 出力コネクタ) フォーマット:YYYYMMDD
dobm
dobd
lnlnstringN
fnfnstringN
fiファーストネームのイニシャル - Facebook Conversions APIではサポートされていません 参照:https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
ctctstringN
stststringN
zipzpstringN
countrycountrystringN
madidモバイル広告主ID、Androidデバイスからの広告IDまたはAppleデバイスからの広告識別子(IDFA)。 注意: このパラメータはアプリイベント*のみに使用されます* 参照:https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
external_idexternal_idstringN
lead_idlead_idlongN
action_sourcestringYFacebook Conversions 出力コネクタの追加フィールドで、オフラインイベントを示します。値は physical_store に設定する必要があります

サンプルクエリ

SELECT
  event_name,
  event_time,
  custom_data,
  data_processing_options,
  data_processing_options_country,
  data_processing_options_state,
  em,
  ph,
  ge,
  db,
  ln,
  fn,
  ct,
  ct,
  st,
  zp,
  country,
  external_id,
  lead_id,
  action_source
FROM
  TABLE_NAME