สร้างรายการโฆษณา Demand Gen

รายการบรรทัด Demand Gen จะแสดงกลุ่มโฆษณาและโฆษณาในหลายรูปแบบใน แพลตฟอร์มที่มีประสิทธิภาพสูงสุดของ Google ซึ่งรวมถึง YouTube, สำรวจ, Gmail และ เครือข่าย Display ของ Google รายการโฆษณา Demand Gen เช่นเดียวกับรายการโฆษณาประเภทอื่นๆ ได้รับการจัดการโดยใช้ทรัพยากร LineItem และทํางานตามงบประมาณ กลยุทธ์การเสนอราคา และการกําหนดเป้าหมายที่ตั้งไว้ นอกจากนี้ ยังมีการตั้งค่าเฉพาะสำหรับรายการโฆษณา Demand Gen ในช่องdemandGenSettings ด้วย

รายการโฆษณา Demand Gen มีทรัพยากรย่อยที่เรียกว่ากลุ่มโฆษณา กลุ่มโฆษณาช่วยให้คุณควบคุมได้อีกระดับภายใต้รายการโฆษณาแต่ละรายการ

เลือกการกำหนดค่า

ก่อนสร้างรายการโฆษณา Demand Gen โปรดตรวจสอบและตัดสินใจเลือกการตั้งค่าที่เกี่ยวข้อง

สําหรับรายการโฆษณา Demand Gen

  • ต้องตั้งค่า lineItemType เป็น LINE_ITEM_TYPE_DEMAND_GEN
  • ต้องตั้งค่า bidStrategy โดยใช้ฟิลด์ demandGenBid ของออบเจ็กต์ BiddingStrategy
  • ต้องตั้งค่า budget เป็นจำนวนคงที่ในระดับรายการโฆษณา และไม่สามารถรับค่ามาจากใบสั่งซื้อการใส่โฆษณาระดับบนสุด
  • demandGenSettings ใช้เพื่อตั้งค่าที่เฉพาะเจาะจงสำหรับรายการโฆษณา Demand Gen ฟิลด์ geoLanguageTargetingEnabled ของออบเจ็กต์ DemandGenSettings จะควบคุมว่ามีการกำหนดเป้าหมายตามสถานที่และภาษาที่ระดับรายการโฆษณาหรือที่กลุ่มโฆษณาแต่ละกลุ่มหรือไม่ เมื่อสร้างรายการโฆษณาแล้ว คุณจะอัปเดตช่องนี้ไม่ได้ ตั้งค่าฟิลด์เป็น true หากต้องการกำหนดค่าการกำหนดเป้าหมายนี้ที่ระดับรายการโฆษณา
  • ไม่ควรตั้งค่า creativeIds ระบบจะกําหนดและกําหนดค่าชิ้นงานโดยตรงในแหล่งข้อมูล AdGroupAd

ต้องระบุข้อมูลในฟิลด์ต่อไปนี้สำหรับรายการโฆษณา Demand Gen และทำงานเหมือนกับในรายการโฆษณาประเภทอื่นๆ

นอกจากนี้ ทรัพยากร LineItem ยังมีช่องที่ไม่บังคับอีกหลายช่องที่อาจตั้งค่าได้ อ่านข้อมูลเพิ่มเติมในเอกสารประกอบอ้างอิง

สร้างรายการโฆษณา

วิธีสร้างรายการโฆษณา Demand Gen ด้วยการตั้งค่าต่อไปนี้

  • เที่ยวบินที่ได้รับโอนและงบประมาณ $100
  • รูปแบบรายได้ของพาร์ทเนอร์ที่ 0.1% ของค่าใช้จ่ายสื่อทั้งหมด
  • กลยุทธ์การเสนอราคาที่เพิ่มประสิทธิภาพเพื่อให้มีต้นทุนเฉลี่ย 300 บาทต่อ Conversion
  • ค่ากําหนดสําหรับการกําหนดเป้าหมายตามสถานที่และภาษาให้กับกลุ่มโฆษณาโดยตรงภายใต้รายการโฆษณา

Python

# Provide the ID of the parent advertiser.
advertiser_id = advertiser-id

# Provide the ID of the parent insertion order.
insertion_order_id = insertion-order-id

# Provide the display name of the line item.
display_name = display-video

# Provide the Floodlight activity ID to use for conversion tracking.
floodlight_activity_id = floodlight-activity-id

# Provide whether the line item will serve EU political ads.
contains_eu_political_ads = contains-eu-political-ads

# Create a line item object with example values.
line_item_obj = {
    "insertionOrderId": insertion_order_id,
    "displayName": display_name,
    "lineItemType": "LINE_ITEM_TYPE_DEMAND_GEN",
    "entityStatus": "ENTITY_STATUS_DRAFT",
    "flight": {"flightDateType": "LINE_ITEM_FLIGHT_DATE_TYPE_INHERITED"},
    "budget": {
        "budgetAllocationType": "LINE_ITEM_BUDGET_ALLOCATION_TYPE_FIXED",
        "maxAmount": 100000000
    },
    "pacing": {
        "pacingPeriod": "PACING_PERIOD_FLIGHT",
        "pacingType": "PACING_TYPE_EVEN",
        "dailyMaxMicros": 10000,
    },
    "partnerRevenueModel": {
        "markupType": (
            "PARTNER_REVENUE_MODEL_MARKUP_TYPE_TOTAL_MEDIA_COST_MARKUP"
        ),
        "markupAmount": 100,
    },
    "bidStrategy": {
        "demandGenBid": {
            "type": "DEMAND_GEN_BIDDING_STRATEGY_TYPE_TARGET_CPA",
            "value": "10000000"
        }
    },
    "conversionCounting": {
        "postViewCountPercentageMillis": "100000",
        "floodlightActivityConfigs": [
            {
                "floodlightActivityId": floodlight_activity_id,
                "postClickLookbackWindowDays": 90,
                "postViewLookbackWindowDays": 90
            }
        ]
    },
    "containsEuPoliticalAds": contains_eu_political_ads,
    "demandGenSettings": {
        "geoLanguageTargetingEnabled": False
    }
}

# Build and execute request.
response = (
    service.advertisers()
    .lineItems()
    .create(advertiserId=advertiser_id, body=line_item_obj)
    .execute()
)

# Display the new line item.
print(f"Demand Gen line Item {response['name']} was created.")