生命周期目标

使用 Google Ads API 的 CustomerLifecycleGoalCampaignLifecycleGoal 资源来配置与客户生命周期相关的目标。Google Ads API 支持客户获取目标,可帮助您通过 Google Ads 搜索广告系列和效果最大化广告系列高效获取新客户。

如果您的 Google Ads 账号使用的是跨账号转化跟踪,则必须在 Google Ads 转化账号中配置客户生命周期目标,而不是直接在 Google Ads 账号中配置。不过,您仍应在账号中设置广告系列生命周期目标。这与您在使用跨账号转化跟踪功能时管理其他目标的方式类似。

配置客户生命周期目标

在客户级层,通过创建或更新 CustomerLifecycleGoal 来配置生命周期目标。每个 Google Ads 账号最多只能有一个 CustomerLifecycleGoalcustomer_acquisition_goal_value_settings.value 字段用于定义要与新客户的首次购买转化价值相加的额外价值调整额。customer_acquisition_goal_value_settings.high_lifetime_value 用于定义高价值新客户的增量转化价值。如果设置了高生命周期价值,则该值应大于价值。

细分受众群体

您必须使用 UserListCustomerType 资源来细分受众群体,以实现客户生命周期目标。您必须通过为每个用户名单和类别的组合创建 UserListCustomerType,将每个用户名单与一个或多个类别相关联。

使用 UserListCustomerTypeService 创建 UserListCustomerType 实例。 如果您之前已填充 CustomerLifecycleGoal.lifecycle_goal_customer_definition_settings.existing_user_lists 字段,则您的账号中已包含相关的 UserListCustomerType 实例。

UserListCustomerTypeService 仅支持 createremove 操作,因此如果您想更新现有的 UserListCustomerType,必须先将其移除,然后创建一个包含必要更新的新 UserListCustomerType

一个 UserListCustomerType 只能分配给一个用户名单,但一个用户名单可以关联多个 UserListCustomerType 实例,前提是这些 UserListCustomerType 实例之间没有冲突。尝试将具有以下 customer_type_category 组合的 UserListCustomerType 实例分配给同一用户列表会导致 UserListCustomerTypeError.CONFLICTING_CUSTOMER_TYPES 错误:

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

配置广告系列生命周期目标

在广告系列一级,通过创建或更新 CampaignLifecycleGoal 来配置生命周期目标。每个广告系列最多只能有一个 CampaignLifecycleGoal

通过广告系列级目标的 customer_acquisition_goal_settings 字段,您可以设置广告系列的优化模式,以及替换父级客户目标中的价值设置。

optimization_mode 可以是下列值之一:

TARGET_ALL_EQUALLY
广告系列会以同等的方式定位新客户和现有客户。这是默认的优化模式。
BID_HIGHER_FOR_NEW_CUSTOMERS
广告系列同时面向新客户和现有客户,但针对预计为新客户且不在existing_user_lists中的客户设置的出价更高。
TARGET_NEW_CUSTOMERS
广告系列仅定位新客户。

value_settings 与客户级目标的 customer_acquisition_goal_value_settings 相同。使用这些广告系列级设置可替换特定广告系列的值。

“客户留存”目标

客户留存目标旨在提高贵企业的客户忠诚度和生命周期价值 (LTV)。它们可在效果最大化广告系列中提供多种模式,让您能够定位现有客户的特定细分。

在创建保留目标之前,您必须满足保留目标简介中所述的前提条件。这包括拥有效果最大化广告系列和目标客户匹配用户名单。

如需创建保留目标,您必须先初始化 GoalService,然后使用 mutate_goals 方法发出请求以创建新目标。

def create_goal(client: GoogleAdsClient, customer_id: str) -> None:
    """Sends an API request to add a new 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.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]
    )

这会为指定的客户账号在账号级层面上创建一个新的用户留存目标,该目标将应用于该客户账号的所有广告系列。默认情况下,此目标会定位到目标客户匹配用户名单中的所有用户。

您可以使用 CampaignGoalConfig 通过广告系列级设置替换此目标。获得账号级目标后,使用其 resource_name 通过 CampaignGoalConfigService 上的 mutate_campaign_goal_configs 方法创建 CampaignGoalConfig

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

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        goal_resource_name: the resource name of an existing 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

    # Note that the target_option will be set to TARGET_ALL by default. In order
    # to set it to TARGET_SPECIFIC your account must be allowlisted.
    #
    # 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

检索生命周期目标

与 Google Ads API 中的其他资源一样,您可以使用 GoogleAdsServicesearchsearchStream 方法来检索生命周期目标。

以下查询会检索 Google Ads 账号中每个 CustomerLifecycleGoal 的详细信息:

SELECT
  customer_lifecycle_goal.owner_customer,
  customer_lifecycle_goal.customer_acquisition_goal_value_settings.value,
  customer_lifecycle_goal.customer_acquisition_goal_value_settings.high_lifetime_value
FROM customer_lifecycle_goal

同样,以下查询会检索每个 CampaignLifecycleGoal 的详细信息:

SELECT
  campaign_lifecycle_goal.campaign,
  campaign_lifecycle_goal.customer_acquisition_goal_settings.optimization_mode,
  campaign_lifecycle_goal.customer_acquisition_goal_settings.value_settings.value,
  campaign_lifecycle_goal.customer_acquisition_goal_settings.value_settings.high_lifetime_value
FROM campaign_lifecycle_goal