آزمایش‌های بهینه‌سازی دارایی

آزمایش‌های بهینه‌سازی دارایی ترکیب‌های مختلف دارایی را در پویش‌های «عملکرد بیشینه» آزمایش می‌کنند، که به شما امکان می‌دهد عملکرد مجموعه‌های مختلف دارایی را با مجموعه پایه مقایسه کنید.

این گردش کار برای ExperimentType.OPTIMIZE_ASSETS پشتیبانی می‌شود.

راه‌اندازی

برای راه‌اندازی آزمایش بهینه‌سازی دارایی:

  • دارایی جدید و آزمایشی با بازوهای کنترل و درمان ایجاد کنید.
  • دارایی جدید را به گروه دارایی بازوی درمان در یک درخواست تغییر پیوند دهید.

پیش‌نیازها

قبل‌از ایجاد آزمایش بهینه‌سازی دارایی، باید پویش «عملکرد بیشینه» موجود و منبع پایه AssetGroup (customers/{customer_id}/assetGroups/{asset_group_id}) داشته باشید که به‌عنوان خط مبنا برای هر دو بازوی آزمایش عمل کند.

درخواست ترتیب عملیات

چون این نهادها به یکدیگر وابسته‌اند، باید از نام‌های موقت منابع برای ارجاع به منابع ایجادشده در عملیات قبلی در همان درخواست استفاده کنید.

عملیات در درخواست شما باید به ترتیب زیر باشد:

  1. یک یا چند منبع Asset با نام‌های منبع موقت (مانند customers/CUSTOMER_ID/assets/-1) ایجاد کنید. این‌ها دارایی‌های آزمایشی شما هستند.
  2. یک Experiment با نام منبع موقت (برای مثال، customers/CUSTOMER_ID/experiments/-2) ایجاد کنید، type روی OPTIMIZE_ASSETS تنظیم شده باشد، status روی ENABLED تنظیم شده باشد، و optimize_assets_experiment.optimize_assets_experiment_subtype روی OptimizeAssetsExperimentSubtype انتخاب‌شده (برای مثال، COMPARE_ASSETS) تنظیم شده باشد.
  3. دو منبع ExperimentArm پیوندشده به نام منبع آزمایش موقت از مرحله ۲ ایجاد کنید، campaigns (به نام منبع پویش «بیشینه‌سازی عملکرد»)، traffic_split (مجموعاً 100)، و asset_groups (ExperimentArm.AssetGroupInfo) را در هر شاخه تنظیم کنید:

    • یک بازوی کنترل (control = true) که در آن asset_groups حاوی یک AssetGroupInfo با asset_group تنظیم‌شده روی نام منبع پایه AssetGroup (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID) است. هنگام آزمایش دارایی‌های تازه اضافه‌شده درمقابل گروه دارایی پایه (یا هنگام استفاده از زیرنوع‌های ADD_ASSETS_TO_ASSETLESS_RETAIL یا ADD_VIDEO_ASSETS_TO_VIDEOLESS)، asset_group_assets را در بازوی کنترل تنظیم‌نشده رها کنید؛ هنگام مقایسه دو مجموعه دارایی متمایز تحت COMPARE_ASSETS، ورودی‌های AssetGroupAssetInfo بازوی کنترل را فهرست کنید (asset و field_type).
    • یک شاخه درمان (control = false) که در آن asset_groups حاوی یک AssetGroupInfo با asset_group تنظیم‌شده روی همان نام منبع AssetGroup پایه (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID) و asset_group_assets (repeated AssetGroupAssetInfo) است که منابع Asset و field_typeها را برای شاخه درمان فهرست می‌کند، ازجمله Asset آزمایشی (customers/CUSTOMER_ID/assets/-1) تازه ایجادشده از مرحله ۱.
  4. AssetGroupAsset منبع ایجاد کنید که دارایی‌های آزمایشی مرحله ۱ (customers/CUSTOMER_ID/assets/-1) را به AssetGroup پایه استفاده‌شده در بازوهای آزمایش پیوند دهد.

جاوا

This example is not yet available in Java; you can take a look at the other languages.
    

C#‎

This example is not yet available in C#; you can take a look at the other languages.
    

PHP

This example is not yet available in PHP; you can take a look at the other languages.
    

Python

# 1. Create Assets with temporary resource names.
# We create a text asset and an image asset to showcase different types.
asset_operation_1 = create_text_asset_operation(
    client,
    customer_id,
    ASSET_1_TEMP_ID,
    "Fly to Mars!",
)
asset_operation_2 = create_image_asset_operation(
    client,
    customer_id,
    ASSET_2_TEMP_ID,
    "https://gaagl.page.link/Eit5",
    "Mars Landscape View",
)

# 2. Create an Experiment with a temporary resource name.
experiment_operation = client.get_type("MutateOperation")
experiment = experiment_operation.experiment_operation.create
experiment.resource_name = googleads_service.experiment_path(
    customer_id, EXPERIMENT_TEMP_ID
)
experiment.name = f"Interstellar Asset Experiment #{uuid4()}"
experiment.type_ = client.enums.ExperimentTypeEnum.OPTIMIZE_ASSETS
# Set the optimize assets experiment subtype to COMPARE_ASSETS.
experiment.optimize_assets_experiment.optimize_assets_experiment_subtype = (
    client.enums.OptimizeAssetsExperimentSubtypeEnum.COMPARE_ASSETS
)

# 3. Create two ExperimentArm resources.
treatment_assets = [
    (ASSET_1_TEMP_ID, client.enums.AssetFieldTypeEnum.HEADLINE),
    (ASSET_2_TEMP_ID, client.enums.AssetFieldTypeEnum.MARKETING_IMAGE),
]
arm_operations = create_arms_operations(
    client,
    customer_id,
    EXPERIMENT_TEMP_ID,
    campaign_resource_name,
    asset_group_id,
    treatment_assets,
)

# 4. Create AssetGroupAssets linking the assets to the asset group.
asset_group_asset_operation_1 = create_asset_group_asset_operation(
    client,
    customer_id,
    asset_group_id,
    ASSET_1_TEMP_ID,
    client.enums.AssetFieldTypeEnum.HEADLINE,
)
asset_group_asset_operation_2 = create_asset_group_asset_operation(
    client,
    customer_id,
    asset_group_id,
    ASSET_2_TEMP_ID,
    client.enums.AssetFieldTypeEnum.MARKETING_IMAGE,
)

# Send all operations in a single Mutate request.
# The operations must be in this specific order.
mutate_operations = [
    asset_operation_1,
    asset_operation_2,
    experiment_operation,
    *arm_operations,
    asset_group_asset_operation_1,
    asset_group_asset_operation_2,
]

response = googleads_service.mutate(
    customer_id=customer_id,
    mutate_operations=mutate_operations,
)
      

Ruby

# 1. Create Assets with temporary resource names.
# We create a text asset and an image asset to showcase different types.
asset_operation_1 = create_text_asset_operation(
  client,
  customer_id,
  asset_1_temp_id,
  "Fly to Mars!",
)
asset_operation_2 = create_image_asset_operation(
  client,
  customer_id,
  asset_2_temp_id,
  "https://gaagl.page.link/Eit5",
  "Mars Landscape View",
)

# 2. Create an Experiment with a temporary resource name.
experiment_operation = client.operation.mutate do |m|
  m.experiment_operation = client.operation.create_resource.experiment do |e|
    e.resource_name = client.path.experiment(customer_id, experiment_temp_id)
    e.name = "Interstellar Asset Experiment #{(Time.new.to_f * 1000).to_i}"
    e.type = :OPTIMIZE_ASSETS
    # Set the optimize assets experiment subtype to COMPARE_ASSETS.
    e.optimize_assets_experiment = client.resource.optimize_assets_experiment_info do |oae|
      oae.optimize_assets_experiment_subtype = :COMPARE_ASSETS
    end
  end
end

# 3. Create two ExperimentArm resources.
treatment_assets = [
  [asset_1_temp_id, :HEADLINE],
  [asset_2_temp_id, :MARKETING_IMAGE],
]
arm_operations = create_arms_operations(
  client,
  customer_id,
  experiment_temp_id,
  campaign_resource_name,
  asset_group_id,
  treatment_assets,
)

# 4. Create AssetGroupAssets linking the assets to the asset group.
asset_group_asset_operation_1 = create_asset_group_asset_operation(
  client,
  customer_id,
  asset_group_id,
  asset_1_temp_id,
  :HEADLINE,
)
asset_group_asset_operation_2 = create_asset_group_asset_operation(
  client,
  customer_id,
  asset_group_id,
  asset_2_temp_id,
  :MARKETING_IMAGE,
)

# Send all operations in a single Mutate request.
# The operations must be in this specific order.
mutate_operations = [
  asset_operation_1,
  asset_operation_2,
  experiment_operation,
  *arm_operations,
  asset_group_asset_operation_1,
  asset_group_asset_operation_2,
]

response = client.service.google_ads.mutate(
  customer_id: customer_id,
  mutate_operations: mutate_operations,
)
      

پرل

This example is not yet available in Perl; you can take a look at the other languages.
    

curl

گزارش آزمایش

برای پُرسمان کردن منبع experiment و مقایسه سنجه‌ها بین گروه‌های دارایی کنترل و درمان، راهنمای گزارش‌دهی را ببینید.

فارغ‌التحصیل یا پایان

پس‌از ارزیابی نتایج، می‌توانید آزمایش را بااستفاده از ExperimentService پایان دهید یا آن را ارتقا دهید.

  • پایان: اگر از نتایج شاخه درمان راضی نیستید، از EndExperiment استفاده کنید. این عملیات همگام است.
  • ارتقا دادن: اگر عملکرد گروه دارایی بازوی درمان را ترجیح می‌دهید، از GraduateExperiment استفاده کنید. به‌عنوان بخشی از این فرایند، پویش پایه اصلی مرتبط با بازوی کنترل موقتاً متوقف می‌شود و بازوی درمان به پویش جدید و مستقلی تبدیل می‌شود. این عملیات همگام است.