生命週期目標

使用 Google Ads API 的 GoalCampaignGoalConfig 資源,設定與顧客生命週期相關的目標。Google Ads API 支援獲取新客目標客戶留存率目標,可透過 Google Ads 廣告活動有效管理顧客生命週期價值調整項。

如果 Google Ads 帳戶使用跨帳戶轉換追蹤,您必須在Google Ads 轉換帳戶中設定顧客層級生命週期目標,而不是直接在 Google Ads 帳戶中設定。不過,您仍應在帳戶中設定廣告活動層級的設定。這與使用跨帳戶轉換追蹤時管理其他目標的方式類似。

顧客生命週期目標類型

顧客生命週期目標是在帳戶層級使用 Goal 資源設定。目標代表特定的生命週期目標,並由 goal_type 定義。

支援的生命週期目標類型如下:

NEW_CUSTOMER_ACQUISITION
為新客的轉換指派價值調整項,有效獲取新客。
CUSTOMER_RETENTION
重新吸引現有顧客、高價值顧客和流失顧客。
LOYALTY_RETENTION
:專門用於提高會員方案成員的留存率和參與度。

設定顧客生命週期目標

在顧客層級,建立 Goal 即可設定生命週期目標。每個 Google Ads 帳戶中,每種目標類型 (NEW_CUSTOMER_ACQUISITIONCUSTOMER_RETENTIONLOYALTY_RETENTION) 最多只能有一個 Goal

獲客目標設定

如要設定獲取新客 (NCA),請將 goal_type 設為 NEW_CUSTOMER_ACQUISITION,並使用 GoalServicenew_customer_acquisition_goal_settings 欄位中設定。

這項設定會使用 CustomerLifecycleOptimizationValueSettings,為獲得的新客指定轉換價值調整項:

  • value_adjustment (oneof):
    • additional_value (雙倍):要加到新顧客首次購物轉換的轉換價值增幅。
    • value_multiplier (double):要套用至新客首次購物轉換價值的乘數 (尚未支援)。
  • high_lifetime_value_adjustment (oneof):
    • additional_high_lifetime_value (雙倍):系統判定為高生命週期價值的新客轉換價值增幅。
    • high_lifetime_value_multiplier (雙精度浮點數):要套用至高生命週期價值新客的轉換價值調節係數 (尚未支援)。

如果已設定高生命週期價值,則該值應大於價值。

def create_nca_goal(client: GoogleAdsClient, customer_id: str) -> None:
    """Sends an API request to add a new New Customer Acquisition Goal.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
    """
    goal_operation: GoalOperation = client.get_type("GoalOperation")
    goal = goal_operation.create
    goal.goal_type = client.enums.GoalTypeEnum.NEW_CUSTOMER_ACQUISITION

    # Configure the value adjustments.
    goal.new_customer_acquisition_goal_settings.value_settings.additional_value = 50.0
    goal.new_customer_acquisition_goal_settings.value_settings.additional_high_lifetime_value = 100.0

    goal_service = client.get_service("GoalService")
    goal_service.mutate_goals(
        customer_id=customer_id, operations=[goal_operation]
    )

客戶留存率目標設定

如要設定顧客回訪率,請將 goal_type 設為 CUSTOMER_RETENTION,並在 retention_goal_settings 欄位中設定。

建立客戶留存率目標前,請務必先滿足「關於客戶留存率目標」一文所述的先決條件。包括最高成效廣告活動和目標顧客比對使用者名單。

def create_retention_goal(client: GoogleAdsClient, customer_id: str) -> None:
    """Sends an API request to add a new Customer Retention Goal.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
    """
    goal_operation: GoalOperation = client.get_type("GoalOperation")
    goal = goal_operation.create
    goal.goal_type = client.enums.GoalTypeEnum.CUSTOMER_RETENTION
    goal.retention_goal_settings.value_settings.additional_value = 50.0
    goal.retention_goal_settings.value_settings.additional_high_lifetime_value = 100.0

    goal_service = client.get_service("GoalService")
    goal_service.mutate_goals(
        customer_id=customer_id, operations=[goal_operation]
    )

系統會為指定客戶帳戶建立新的帳戶層級客戶留存率目標,並套用至該帳戶的所有廣告活動。根據預設,這項目標會指定目標顧客比對使用者名單中的所有使用者。

會員留存目標設定

如要為會員方案成員設定會員續訂目標,請將 goal_type 設為 LOYALTY_RETENTION,並在 loyalty_retention_goal_settings 欄位 (LoyaltyRetentionGoal) 中設定。

如要設定會員留存率目標,value_settings 只能使用 CustomerLifecycleOptimizationValueSettings value_multiplier 設定:

def create_loyalty_retention_goal(client: GoogleAdsClient, customer_id: str) -> None:
    """Sends an API request to add a new Loyalty Retention Goal.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
    """
    goal_operation: GoalOperation = client.get_type("GoalOperation")
    goal = goal_operation.create
    goal.goal_type = client.enums.GoalTypeEnum.LOYALTY_RETENTION
    goal.loyalty_retention_goal_settings.value_settings.value_multiplier = 1.5

    goal_service = client.get_service("GoalService")
    goal_service.mutate_goals(
        customer_id=customer_id, operations=[goal_operation]
    )

區隔目標對象

您必須使用 UserListCustomerType 資源,為顧客生命週期目標 (包括獲取新客、顧客留存和會員留存目標) 區隔目標對象。您必須為每份使用者名單建立一或多個類別,方法是為每份使用者名單和類別的組合建立 UserListCustomerType

使用 UserListCustomerTypeService 建立 UserListCustomerType 例項。

UserListCustomerTypeService 僅支援 createremove 作業,因此如要更新現有 UserListCustomerType,必須先移除,然後建立新的並進行必要更新。

UserListCustomerType 只能指派給一個使用者名單,但只要UserListCustomerType 執行個體之間沒有衝突,一個使用者名單可以有多個相關聯的 UserListCustomerType 執行個體。如果嘗試將下列 customer_type_category 執行個體組合指派給相同的使用者清單,會導致 UserListCustomerTypeError.CONFLICTING_CUSTOMER_TYPES 錯誤:UserListCustomerType

發布後的前 customer_type_category 第二個 customer_type_category
購買者 CONVERTED_LEADS
購買者 QUALIFIED_LEADS
購買者 CART_ABANDONERS
CONVERTED_LEADS QUALIFIED_LEADS
DISENGAGED_CUSTOMERS CONVERTED_LEADS
DISENGAGED_CUSTOMERS QUALIFIED_LEADS
DISENGAGED_CUSTOMERS CART_ABANDONERS
LOYALTY_TIER_X_MEMBERS LOYALTY_TIER_Y_MEMBERS

設定廣告活動生命週期目標

在廣告活動層級,您可以使用 CampaignGoalConfig 設定廣告活動專屬的覆寫或指定目標選項。取得帳戶層級目標後,請使用其 resource_name,透過 CampaignGoalConfigService 上的 mutate_campaign_goal_configs 方法建立 CampaignGoalConfig

廣告活動獲取新客設定

如要在廣告活動層級覆寫設定或設定獲取新客目標,請設定 campaign_new_customer_acquisition_settings 欄位 (類型為 CampaignNewCustomerAcquisitionGoalSettings):

  • value_settings_override (類型:CustomerLifecycleOptimizationValueSettings):自訂價值調整項,可覆寫帳戶層級設定。
  • target_option (類型:CustomerLifecycleOptimizationMode):控制顧客生命週期最佳化模式。選項包括:
    • TARGET_ALL:廣告活動會同時向新顧客和現有顧客放送,但會根據設定的價值調整幅度,對新顧客提高出價。
    • TARGET_SPECIFIC:廣告活動只會向新客放送。出價調整幅度不適用於這個選項。
def create_campaign_nca_config(
    client: GoogleAdsClient,
    customer_id: str,
    goal_resource_name: str,
    campaign_resource_name: str,
) -> None:
    """Sends an API request to add a new CampaignGoalConfig for NCA.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        goal_resource_name: the resource name of an existing NCA Goal.
        campaign_resource_name: the resource name of an existing Campaign.
    """
    operation: CampaignGoalConfigOperation = client.get_type("CampaignGoalConfigOperation")
    goal_config = operation.create
    goal_config.campaign = campaign_resource_name
    goal_config.goal = goal_resource_name

    # Set the target option to target both new and existing customers.
    goal_config.campaign_new_customer_acquisition_settings.target_option = (
        client.enums.CustomerLifecycleOptimizationModeEnum.TARGET_ALL
    )
    # Optionally override value settings.
    goal_config.campaign_new_customer_acquisition_settings.value_settings_override.additional_value = 60.0

    campaign_goal_config_service = client.get_service("CampaignGoalConfigService")
    campaign_goal_config_service.mutate_campaign_goal_configs(
        customer_id=customer_id, operations=[operation]
    )

廣告活動顧客回訪率設定

如要在廣告活動層級覆寫設定或設定目標,請設定 CampaignRetentionGoalSettings 類型的 campaign_retention_settings 欄位:

def create_campaign_retention_config(
  client: GoogleAdsClient,
  customer_id: str,
  goal_resource_name: str,
  campaign_resource_name: str
) -> None:
    """Sends an API request to add a new CampaignGoalConfig for Retention.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        goal_resource_name: the resource name of an existing Retention Goal.
        campaign_resource_name: the resource name of an existing Campaign.
    """
    operation: CampaignGoalConfigOperation = client.get_type("CampaignGoalConfigOperation")
    goal_config = operation.create
    goal_config.campaign = campaign_resource_name
    goal_config.goal = goal_resource_name

    # goal_config.campaign_retention_settings.target_option = (
    #   client.enums.CustomerLifecycleOptimizationModeEnum.TARGET_SPECIFIC
    # )

    campaign_goal_config_service = client.get_service("CampaignGoalConfigService")
    campaign_goal_config_service.mutate_campaign_goal_configs(
      customer_id=customer_id, operations=[operation]
    )

如未設定,campaign_retention_settings.target_option 會預設為 TARGET_ALL。只有在適當許可清單中的使用者,才能將狀態設為 TARGET_SPECIFIC

廣告活動會員留存率設定

如要覆寫設定,或在廣告活動層級為LOYALTY_RETENTION目標設定會員專屬行為,請在 CampaignGoalConfig 上設定 campaign_loyalty_retention_settings 欄位 (類型為 CampaignLoyaltyRetentionGoalSettings):

  • value_settings_override (類型:CustomerLifecycleOptimizationValueSettings):自訂價值調整項,可覆寫帳戶層級的會員忠誠度留存價值設定。
  • enable_bid_adjustments_for_loyalty_members (類型:bool):是否要在這個廣告活動中,為會員方案成員啟用出價調整幅度。
  • show_targeted_loyalty_member_benefits_in_pla (類型:bool):是否要在適用國家/地區的產品資訊廣告 (PLA) 格式中,顯示指定會員福利。
def create_campaign_loyalty_retention_config(
    client: GoogleAdsClient,
    customer_id: str,
    goal_resource_name: str,
    campaign_resource_name: str,
) -> None:
    """Sends an API request to add a new CampaignGoalConfig for Loyalty Retention.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        goal_resource_name: the resource name of an existing Loyalty Retention Goal.
        campaign_resource_name: the resource name of an existing Campaign.
    """
    operation: CampaignGoalConfigOperation = client.get_type("CampaignGoalConfigOperation")
    goal_config = operation.create
    goal_config.campaign = campaign_resource_name
    goal_config.goal = goal_resource_name

    # Enable bid adjustments and targeted loyalty benefits in PLAs.
    goal_config.campaign_loyalty_retention_settings.enable_bid_adjustments_for_loyalty_members = True
    goal_config.campaign_loyalty_retention_settings.show_targeted_loyalty_member_benefits_in_pla = True

    campaign_goal_config_service = client.get_service("CampaignGoalConfigService")
    campaign_goal_config_service.mutate_campaign_goal_configs(
        customer_id=customer_id, operations=[operation]
    )

驗證和錯誤

設定顧客生命週期目標時,可能會遇到下列限制和錯誤:

目標驗證錯誤

複製目標設定
如果已建立生命週期目標,再建立重複的目標會導致 GoalError.NEW_CUSTOMER_ACQUISITION_GOAL_ALREADY_EXISTS (獲取新客)、GoalError.RETENTION_GOAL_ALREADY_EXISTS (顧客留存率) 或 GoalError.LOYALTY_RETENTION_GOAL_ALREADY_EXISTS (會員留存率) 錯誤。
無效的值設定
設定生命週期目標價值時,如果存在高生命週期價值,則必須存在標準價值 (GoalError.HIGH_LIFETIME_VALUE_PRESENT_BUT_VALUE_ABSENT)。此外,如果設定了高生命週期價值,則該值必須大於價值 (GoalError.HIGH_LIFETIME_VALUE_LESS_THAN_OR_EQUAL_TO_VALUE)。

廣告活動目標設定驗證錯誤

目標特定值覆寫衝突
如果是獲客目標,且 target_option 設為 TARGET_SPECIFIC (僅指定新客),則不得設定廣告活動層級的價值覆寫 (CampaignGoalConfigError.CAMPAIGN_OVERRIDE_VALUES_SET_FOR_NEW_CUSTOMER_ACQUISITION_TARGET_SPECIFIC_OPTION)。如果指定新客,則不適用出價調整幅度。
支援高終身價值廣告活動類型
高生命週期價值覆寫只能為支援的廣告活動類型設定 (CampaignGoalConfigError.CAMPAIGN_OVERRIDE_HIGH_LIFETIME_VALUE_NOT_SUPPORTED_FOR_CAMPAIGN_TYPE)。
不相容的目標
如果廣告活動嘗試同時套用不相容的顧客生命週期最佳化目標 (CampaignGoalConfigError.CANNOT_USE_INCOMPATIBLE_CLO_GOALS),系統就會擲回錯誤。下表列出會觸發這項錯誤的互斥目標組合:
顧客生命週期目標類型 / 模式 目標 / 模式不相容
顧客回訪率 (「只對流失顧客出價」/ TARGET_SPECIFIC) 獲取新客 (「只針對新顧客出價」/ TARGET_SPECIFIC、「提高出價來獲取新客」/ TARGET_ALL)、開發新客
顧客回訪率 (「針對流失顧客設定更高的出價」/ TARGET_ALL) 獲取新客 (「只針對新顧客出價」/ TARGET_SPECIFIC)、開發新客
忠誠度留存 (價值調節係數) 獲取新客 (「只針對新顧客出價」/ TARGET_SPECIFIC)、提高顧客回訪率 (「只針對流失顧客出價」/ TARGET_SPECIFIC)、開發新客、毛利
忠誠度留存 (產品資訊廣告中的福利) 獲取新客 (「只對新顧客出價」/ TARGET_SPECIFIC)、開發新客、毛利
開發潛在客戶 獲取新客 (「只對新顧客出價」/ TARGET_SPECIFIC、「對新顧客提高出價」/ TARGET_ALL)

擷取生命週期目標

與 Google Ads API 中的其他資源一樣,請使用 GoogleAdsServicesearchsearchStream 方法,擷取生命週期目標和設定。

下列查詢會擷取 Google Ads API 帳戶中每個已設定 Goal 的詳細資料:

SELECT
  goal.goal_id,
  goal.goal_type,
  goal.owner_customer,
  goal.new_customer_acquisition_goal_settings.value_settings.additional_value,
  goal.new_customer_acquisition_goal_settings.value_settings.additional_high_lifetime_value,
  goal.retention_goal_settings.value_settings.additional_value,
  goal.retention_goal_settings.value_settings.additional_high_lifetime_value,
  goal.loyalty_retention_goal_settings.value_settings.value_multiplier
FROM goal

同樣地,下列查詢會擷取每個 CampaignGoalConfig 的詳細資料:

SELECT
  campaign_goal_config.campaign,
  campaign_goal_config.goal,
  campaign_goal_config.goal_type,
  campaign_goal_config.campaign_new_customer_acquisition_settings.target_option,
  campaign_goal_config.campaign_new_customer_acquisition_settings.value_settings_override.additional_value,
  campaign_goal_config.campaign_new_customer_acquisition_settings.value_settings_override.additional_high_lifetime_value,
  campaign_goal_config.campaign_retention_settings.target_option,
  campaign_goal_config.campaign_retention_settings.value_settings_override.additional_value,
  campaign_goal_config.campaign_loyalty_retention_settings.value_settings_override.value_multiplier,
  campaign_goal_config.campaign_loyalty_retention_settings.enable_bid_adjustments_for_loyalty_members,
  campaign_goal_config.campaign_loyalty_retention_settings.show_targeted_loyalty_member_benefits_in_pla
FROM campaign_goal_config