您可將造訪商店、致電客服或在實體商店採取動作的用戶分類,然後以不同的 Facebook 廣告將目標鎖定在這些用戶。
例如,若要鎖定過去 90 天內花費超過 1000 美元的用戶:
curl \ -F 'name=90d High Value' \ -F 'rule={"inclusions":{"operator":"or","rules":[{"retention_seconds":7776000,"event_sources":[{"id":"<OFFLINE_EVENT_SET_ID>","type":"offline_events"}],"filter":{"operator":"and","filters":[{"operator":"=","field":"event","value":"Purchase"}]},"aggregation":{"type":"sum","field":"value","operator":">","value":"1000"}}]}}' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/customaudiences"
離線轉換的自訂廣告受眾是根據已上傳至離線事件組合的轉換事件。請參閱離線轉換 API 說明文件。
自 2018 年 9 月起,我們不再支援用於網站自訂廣告受眾、應用程式、互動自訂廣告受眾,以及離線轉換資料廣告受眾的 subtype
。唯一例外是,影片的互動自訂廣告受眾仍支援 subtype
。
若要從離線事件組合建立自訂廣告受眾,需要先在廣告管理員中,讓帳號接受自訂廣告受眾的服務條款:
curl \ -F 'name=My New Offline Event Set' \ -F 'rule={"inclusions":{"operator":"or","rules":[{"retention_seconds":2592000,"event_sources":[{"id":"<OFFLINE_EVENT_SET_ID>","type":"offline_events"}],"filter":{"operator":"and","filters":[{"operator":"=","field":"event","value":"purchase"},{"operator":">","field":"value","value":"50+Sheet1!A2+Sheet1!A2+Sheet1!A2+"}]}}]}}' -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/customaudiences
這些參數與您網站的自訂廣告受眾最為相關:
名稱 | 說明 |
---|---|
類型:字串 | 必要項目。 叢集的名稱。 |
類型:字串 | 必要項目。 套用於轉介網址的廣告受眾規則。 |
類型:字串 | 選用項目。 自訂廣告受眾的說明。 |
規則可決定是否應將帳號管理中心帳號加入此廣告受眾。規則會套用至透過離線轉換 API 傳送的離線事件,或是以離線事件管理工具手動上傳的離線事件。規則適用於特定事件或 custom_data
欄位。請參閱廣告受眾規則以取得完整資訊。另請參閱:
//Match all referring `favorite_food` containing the string `'pizza'` in the last 30 days: { "inclusions": { "operator": "or", "rules": [ { "event_sources": [ { "type": "offline_events", "id": "<OFFLINE_EVENT_SET_ID>", } ], "retention_seconds": 2592000, "filter": { "operator": "and", "filters": [ { "field": "custom_data.favorite_food", "operator": "i_contains", "value": "pizza" } ] }, } ] } }
符合購買事件,其中過去 30 天內成本大於或等於 100 美元。考慮針對以下事件使用此規則:
{ "inclusions": { "operator": "or", "rules": [ { "event_sources": [ { "type": "offline_events", "id": "<OFFLINE_EVENT_SET_ID>" } ], "retention_seconds": 2592000, "filter": { "operator": "and", "filters": [ { "field": "event", "operator": "eq", "value": "Purchase" }, { "operator": "or", "filters": [ { "field": "value", "operator": ">=", "value": "100" } ] } ] } } ] } }
符合購買事件,其中產品的顏色為 blue
,由過去 30 天內 custom_data
欄位中名為「color」(顏色)的離線事件屬性所定義。考慮針對以下事件使用此規則:
{ "inclusions": { "operator": "or", "rules": [ { "event_sources": [ { "type": "offline_events", "id": "<OFFLINE_EVENT_SET_ID>" } ], "retention_seconds": 2592000, "filter": { "operator": "and", "filters": [ { "field": "event", "operator": "eq", "value": "Purchase" }, { "operator": "or", "filters": [ { "field": "custom_data.color", "operator": "eq", "value": "blue" } ] } ] } } ] } }