← 返回目录
📁 Use Cases › Campaign creation › Create Lead Generation ads

创建优化位置为即时表单的线索广告

本文介绍了如何创建优化位置为线索表单(即时表单)的线索广告,引导受众在 TikTok 原生的即时表单中进行与线索收集相关的行为。

前提条件

  1. 创建即时表单(线索表单)。

若想创建即时表单,可使用即时体验页面编辑器并将 businessType 设置为 1。

  1. 调用/page/get/,通过page_id获取即时表单对应的即时体验页面ID。

步骤

1. 创建推广系列

使用/campaign/create/接口创建一个推广系列。需确保满足以下要求:

| 设置 {20%}| 要求{30%} | 参数{20%} | 如何设置该参数{30%} |
|---|---|---|---|
| 推广目标 | 线索收集| `objective_type` | `LEAD_GENERATION` |
| Smart+ 推广系列 | 未启用 <br><br>若想了解如何创建优化位置为即时表单的 Smart+ 线索收集推广系列,可查看[创建 Smart+ 线索收集推广系列](https://business-api.tiktok.com/portal/docs?id=1827645480080385#item-link-%E5%88%9B%E5%BB%BA%E4%BC%98%E5%8C%96%E4%BD%8D%E7%BD%AE%E4%B8%BA%E5%8D%B3%E6%97%B6%E8%A1%A8%E5%8D%95%E7%9A%84%20Smart+%20%E7%BA%BF%E7%B4%A2%E6%94%B6%E9%9B%86%E6%8E%A8%E5%B9%BF%E7%B3%BB%E5%88%97)。| / | / |

示例

请求

(code curl http)
curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/campaign/create/' \
--header 'Access-Token: {{Access-Token}}' \
--header 'Content-Type: application/json' \
--data '{
    "advertiser_id": "{{advertiser_id}}",
    "objective_type": "LEAD_GENERATION",
    "campaign_name": "{{campaign_name}}",
    "budget_mode": "BUDGET_MODE_TOTAL",
    "budget": {{budget}}
}'
(/code)

返回

(code curl http)
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "campaign_name": "{{campaign_name}}",
        "modify_time": "{{modify_time}}",
        "objective": "LANDING_PAGE",
        "roas_bid": 0,
        "budget": {{budget}},
        "secondary_status": "CAMPAIGN_STATUS_ENABLE",
        "is_smart_performance_campaign": false,
        "create_time": "{{create_time}}",
        "deep_bid_type": null,
        "campaign_type": "REGULAR_CAMPAIGN",
        "is_new_structure": true,
        "campaign_id": "{{campaign_id}}",
        "budget_mode": "BUDGET_MODE_TOTAL",
        "objective_type": "LEAD_GENERATION",
        "advertiser_id": "{{advertiser_id}}",
        "operation_status": "ENABLE"
    }
}
(/code)

2. 创建广告组

使用/adgroup/create/接口创建一个广告组。需确保满足以下要求:

| 设置 {17%}| 要求{23%} | 参数 {29%}| 如何设置该参数 {31%}|
|---|---|---|---|
| 优化位置 <br>(推广对象类型) | 即时表单 | `promotion_type`<br> `promotion_target_type`  | <ul><li>将`promotion_type` 设置为 `LEAD_GENERATION`,</li><li>同时将`promotion_target_type` 设置为`INSTANT_PAGE` 或不传入该参数</li></ul> |
|(可选)深层漏斗优化 | 启用或不启用 <br> <br>通过深层漏斗优化,您可以在主要优化事件之外再选择一个次要事件,这有助于提升推广系列的效果。 | `deep_funnel_optimization_status`<br>`deep_funnel_event_source`<br>`deep_funnel_event_source_id` <br>`deep_funnel_optimization_event` | <ul><li>若想启用深层漏斗优化,需将 `deep_funnel_optimization_status` 设置为 `ON` 且传入`deep_funnel_event_source`、`deep_funnel_event_source_id` 和 `deep_funnel_optimization_event`。</li><li>若不想启用深层漏斗优化,需将 `deep_funnel_optimization_status`设置为 `OFF` 或不传入`deep_funnel_optimization_status`。无需传入`deep_funnel_event_source`、`deep_funnel_event_source_id` 和`deep_funnel_optimization_event`。 </li></ul><br><p><span style="color:darkred"><b>注意</b></span>:<ul><li>使用 CRM 事件组的深层漏斗优化目前为白名单功能。如需使用此功能,请联系您的 TikTok 销售代表。</li><li>使用 Pixel 或线下事件组的深层漏斗优化已全量发布。</li></ul> |
|版位<br>(广告位) | 选择以下任一类型:<ul><li><strong>自动版位</strong></li><li><strong>编辑版位</strong>(版位需选择 TikTok,或 Pangle,或 TikTok 和 Pangle) </li></ul> | `placement_type`<br>`placements` | 使用以下任一设置:<ul><li>`placement_type`设置为`PLACEMENT_TYPE_AUTOMATIC`</li><li>`placement_type`设置为`PLACEMENT_TYPE_NORMAL`,且`placements`设置为 `["PLACEMENT_TIKTOK"]`, `["PLACEMENT_PANGLE"]`,或`["PLACEMENT_TIKTOK","PLACEMENT_PANGLE"]`。</li></ul> |
| 地域定向 | 需指定线索收集推广目标及所选版位下支持的地域   | `location_ids` | 先调用接口[/tool/region/](https://ads.tiktok.com/marketing_api/docs?id=1737189539571713),将`objective_type`字段设置为`LEAD_GENERATION` 且同时传入`placements`字段。返回的`location_id`字段代表支持的地域ID,可从中选取想定向的地域 ID 传入本字段。 |
| 年龄定向 | 不支持定向18岁以下受众 | `age_groups` | 不支持传入`AGE_13_17`的值 |
| Pangle 流量包<br> (可选) | 支持 | `included_pangle_audience_package_ids`<br>`excluded_pangle_audience_package_ids`  | 支持<br><p><span style="color:darkred"><b>注意</b></span>:此场景下使用 Pangle 流量包目前为白名单功能。如需使用此功能,请联系您的TikTok销售代表。 |
| 定向扩量 | 不支持扩量定向人群至18岁以下受众 | `expansion_enabled`<br>`expansion_types`<br> {-即将废弃} | 若您将`expansion_enabled`设置为`true`,且在`expansion_types`字段的值中设置了`AGE` ,调用不会失败,但您仍旧无法定向18岁以下人群。 |
| 优化目标 | 提交表单 | `optimization_goal`| `LEAD_GENERATION`|
| 计费事件 | oCPM | `billing_event` | `OCPM` |
| 竞价策略 & 投放速度 | <ul><li>若竞价策略设置为成本上限,则投放速度可设置为标准或加速。</li><li> 若竞价策略设置为最大投放量,则投放速度仅可设置为标准。 </li></ul> | `bid_type` <br>`pacing`| <ul><li>若`bid_type`设置为`BID_TYPE_CUSTOM`,则`pacing`支持设置为`PACING_MODE_SMOOTH`或`PACING_MODE_FAST`。</li><li>若`bid_type`设置为 `BID_TYPE_NO_BID`,则`pacing` 仅支持设置为`PACING_MODE_SMOOTH`。</li></ul> |

示例

请求

(code curl http)
curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/adgroup/create/' \
--header 'Access-Token: {{Access-Token}}' \
--header 'Content-Type: application/json' \
--data '{
    "advertiser_id": "{{advertiser_id}}",
    "campaign_id": "{{campaign_id}}",
    "adgroup_name": "{{adgroup_name}}",
    "promotion_type": "LEAD_GENERATION",
    "placement_type": "PLACEMENT_TYPE_NORMAL",
    "placements": ["PLACEMENT_TIKTOK"],
    "video_download_disabled": false,
    "location_ids": ["{{location_id}}"],
    "operating_systems": ["ANDROID"],
    "gender": "GENDER_UNLIMITED",
    "budget_mode": "BUDGET_MODE_TOTAL",
    "budget": {{budget}},
    "schedule_type": "SCHEDULE_START_END",
    "schedule_start_time": "{{schedule_start_time}}",
    "schedule_end_time": "{{schedule_end_time}}",
    "optimization_goal": "LEAD_GENERATION",
    "bid_type": "BID_TYPE_NO_BID",
    "billing_event": "OCPM",
    "pacing": "PACING_MODE_SMOOTH"
}'
(/code)

返回

(code curl http)
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "conversion_bid_price": 0,
        "actions": [],
        "promotion_type": "LEAD_GENERATION",
        "app_type": null,
        "pixel_id": null,
        "adgroup_app_profile_page_state": null,
        "adgroup_id": "{{adgroup_id}}",
        "feed_type": null,
        "auto_targeting_enabled": false,
        "frequency": null,
        "location_ids": [
            "{{location_id}}"
        ],
        "optimization_goal": "LEAD_GENERATION",
        "delivery_mode": null,
        "brand_safety_type": "NO_BRAND_SAFETY",
        "campaign_id": "{{campaign_id}}",
        "rf_purchased_type": null,
        "creative_material_mode": "CUSTOM",
        "next_day_retention": null,
        "search_result_enabled": true,
        "dayparting": "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
        "scheduled_budget": 0,
        "statistic_type": null,
        "ios14_quota_type": "UNOCCUPIED",
        "excluded_audience_ids": [],
        "campaign_name": "{{campaign_name}}",
        "pacing": "PACING_MODE_SMOOTH",
        "advertiser_id": "{{advertiser_id}}",
        "interest_keyword_ids": [],
        "purchased_impression": null,
        "device_price_ranges": null,
        "purchased_reach": null,
        "rf_estimated_cpr": null,
        "schedule_type": "SCHEDULE_START_END",
        "create_time": "{{create_time}}",
        "budget_mode": "BUDGET_MODE_TOTAL",
        "schedule_infos": null,
        "brand_safety_partner": null,
        "comment_disabled": false,
        "category_exclusion_ids": [],
        "is_new_structure": true,
        "category_id": "0",
        "adgroup_name": "{{adgroup_name}}",
        "placement_type": "PLACEMENT_TYPE_NORMAL",
        "app_download_url": null,
        "app_id": null,
        "languages": [],
        "optimization_event": "FORM",
        "operating_systems": [
            "ANDROID"
        ],
        "schedule_start_time": "{{schedule_start_time}}",
        "video_download_disabled": false,
        "secondary_status": "ADGROUP_STATUS_CREATE",
        "keywords": null,
        "deep_cpa_bid": 0,
        "is_hfss": false,
        "bid_display_mode": "CPMV",
        "frequency_schedule": null,
        "bid_price": 0,
        "conversion_window": null,
        "billing_event": "OCPM",
        "audience_ids": [],
        "budget": {{budget}},
        "deep_bid_type": null,
        "isp_ids": [],
        "interest_category_ids": [],
        "skip_learning_phase": true,
        "placements": [
            "PLACEMENT_TIKTOK"
        ],
        "modify_time": "{{modify_time}}",
        "schedule_end_time": "{{schedule_end_time}}",
        "rf_estimated_frequency": null,
        "age_groups": [
            "AGE_18_24",
            "AGE_25_34",
            "AGE_35_44",
            "AGE_45_54",
            "AGE_55_100"
        ],
        "inventory_filter_enabled": false,
        "bid_type": "BID_TYPE_NO_BID",
        "operation_status": "ENABLE",
        "gender": "GENDER_UNLIMITED",
        "secondary_optimization_event": null,
        "share_disabled": false,
        "network_types": []
    }
}
(/code)

3. 创建广告

使用/ad/create/接口创建一个广告。需确保满足以下要求:

| 设置 {20%}| 要求{26%} | 参数 {20%}| 如何设置该参数 {35%}|
|---|---|---|---|
| 广告样式 | 选择以下任一样式:<ul><li>单视频</li><li>轮播图片</li></ul> <br><p><span style="color:darkred"><b>注意</b></span>:若要将广告样式设置为轮播图片,您需在广告组层级将版位设置为<b>自动版位</b>或包含 TikTok 的<b>编辑版位</b>。| `ad_format` | 使用以下任一值:<ul><li>`SINGLE_VIDEO`</li><li>`CAROUSEL_ADS`</li></ul> <br><p><span style="color:darkred"><b>注意</b></span>: 若要将 `ad_format` 设置为 `CAROUSEL_ADS`,需在广告组层级将 `placement_type` 设置为 `PLACEMENT_TYPE_AUTOMATIC`,或将 `placement_type` 设置为 `PLACEMENT_TYPE_NORMAL` 且在 `placements` 的值中包含 `PLACEMENT_TIKTOK`。<ul><li>若想了解如何创建创建标准轮播广告,请查看[创建标准轮播广告的步骤](https://business-api.tiktok.com/portal/docs?id=1766217791987713#item-link-%E5%88%9B%E5%BB%BA%E6%A0%87%E5%87%86%E8%BD%AE%E6%92%AD%E5%B9%BF%E5%91%8A%E7%9A%84%E6%AD%A5%E9%AA%A4)。</li></ul> |
| 创新互动样式<br>(对于单视频广告可选)| <ul><li>广告样式为单视频且版位包含 TikTok 时, 仅支持图片卡片。</li><li>广告样式为轮播图片时,不支持创新互动样式。</li></ul>| `card_id` | <ul><li>`ad_format` 为 `SINGLE_VIDEO` 且广告组层级 `placement_type` 设置为 `PLACEMENT_TYPE_AUTOMATIC` 或 `placement_type` 设置为 `PLACEMENT_TYPE_NORMAL` 且 `placements` 的值中包含 `PLACEMENT_TIKTOK` 时,可指定图片卡片的 ID。<ul><li> 若想了解如何使用图片卡片,请查看[卡片](1749019652141058.html)。</li></ul></li><li>`ad_format` 为 `CAROUSEL_ADS` 时,不支持 `card_id` 。</li></ul> |
| 目标页面 | 即时表单(线索表单) | `page_id` | 需指定即时表单的 ID。<br><br><ul><li>若想获取即时表单的 ID,在[/page/get/](1820826387779586.html)中将`business_type`设置为 `LEAD_GEN`。</li><li>若想创建即时表单,可使用[即时体验页面编辑器](1740307202170881.html)并将 `businessType`设置为`1`。</li></ul> |

示例

请求

(code curl http)
curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/ad/create/' \
--header 'Access-Token: {{Access-Token}}' \
--header 'Content-Type: application/json' \
--data '{
    "advertiser_id": "{{advertiser_id}}",
    "adgroup_id": "{{adgroup_id}}",
    "creatives": [{
        "ad_name": "{{ad_name}}",
        "identity_type":"CUSTOMIZED_USER",
        "identity_id":"{{identity_id}}",
        "ad_format": "SINGLE_VIDEO",
        "video_id":"{{video_id}}",
        "image_ids":["{{image_id}}"],
        "ad_text": "{{ad_text}}",
        "call_to_action": "{{call_to_action}}",
        "page_id":"{{page_id}}"
    }]
}'
(/code)

返回

(code curl http)
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "ad_ids": [
            "{{ad_id}}"
        ],
        "need_audit": false,
        "creatives": [
            {
                "click_tracking_url": null,
                "playable_url": "",
                "display_name": "{{display_name}}",
                "identity_type": "CUSTOMIZED_USER",
                "tracking_offline_event_set_ids": [
                    "{{tracking_offline_event_set_id}}",
                    "{{tracking_offline_event_set_id}}"
                ],
                "adgroup_id": "{{adgroup_id}}",
                "deeplink": null,
                "video_id": "{{video_id}}",
                "ad_name": "{{ad_name}}",
                "campaign_name": "{{campaign_name}}",
                "advertiser_id": "{{advertiser_id}}",
                "ad_id": "{{ad_id}}",
                "avatar_icon_web_uri": "{{avatar_icon_web_uri}}",
                "call_to_action_id": null,
                "campaign_id": "{{campaign_id}}",
                "is_new_structure": true,
                "music_id": null,
                "viewability_postbid_partner": "UNSET",
                "app_name": "",
                "is_aco": false,
                "landing_page_urls": null,
                "ad_texts": null,
                "call_to_action": "{{call_to_action}}",
                "create_time": "{{create_time}}",
                "adgroup_name": "{{adgroup_name}}",
                "vast_moat_enabled": false,
                "image_ids": [
                    "{{image_id}}"
                ],
                "modify_time": "{{modify_time}}",
                "profile_image_url": "{{profile_image_url}}",
                "ad_format": "SINGLE_VIDEO",
                "operation_status": "ENABLE",
                "brand_safety_vast_url": null,
                "impression_tracking_url": null,
                "optimization_event": "FORM",
                "ad_text": "{{ad_text}}",
                "tracking_pixel_id": 0,
                "landing_page_url": null,
                "card_id": null,
                "identity_id": "{{identity_id}}",
                "brand_safety_postbid_partner": "UNSET",
                "viewability_vast_url": null,
                "ad_ref_pixel_id": {{ad_ref_pixel_id}},
                "creative_type": "LEAD_ADS",
                "creative_authorized": false,
                "page_id": {{page_id}}
            }
        ]
    }
}
(/code)

内容来源:TikTok API for Business 官方文档 · 本地归档

在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →