生命周期目标

您可以使用 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 (double):要添加到新客户首次购买转化价值的增量转化价值。
    • value_multiplier (double):要应用于新客户首次购买转化价值的调节系数(尚不支持)。
  • high_lifetime_value_adjustment (oneof)
    • additional_high_lifetime_value (double):针对被确定为具有高生命周期价值的新客户的增量转化价值。
    • high_lifetime_value_multiplier (double):要应用于具有高生命周期价值的新客户的转化价值调节系数(尚不支持)。

如果设置了高生命周期价值,则该值应大于价值。

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 中仅支持使用 CustomerLifecycleOptimizationValueSettingsvalue_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 组合的 UserListCustomerType 实例分配给同一用户名单,则会导致 UserListCustomerTypeError.CONFLICTING_CUSTOMER_TYPES 错误:

第一个 customer_type_category 第二个 customer_type_category
PURCHASERS CONVERTED_LEADS
PURCHASERS QUALIFIED_LEADS
PURCHASERS 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

广告系列“新客户获取”设置

如需在广告系列一级覆盖设置或配置 NCA 的定位,请配置类型为 CampaignNewCustomerAcquisitionGoalSettingscampaign_new_customer_acquisition_settings 字段:

  • 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]
    )

广告系列“客户留存”设置

如需在广告系列一级覆盖设置或配置客户留存目标的定位,请配置类型为 CampaignRetentionGoalSettingscampaign_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 上配置类型为 CampaignLoyaltyRetentionGoalSettingscampaign_loyalty_retention_settings 字段:

  • 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(对于 NCA)、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