گروه‌های دارایی «عملکرد بیشینه»

گروه دارایی «بیشینه‌سازی عملکرد» مجموعه‌ای از دارایی‌ها (مانند تصاویر، عنوان‌ها، شرح‌ها، و ویدیوها) است که حول یک موضوع یا مرتبط با مخاطب هدف متمرکز شده‌اند و شما هنگام ایجاد پویش «بیشینه‌سازی عملکرد» خود اضافه می‌کنید. از گروه دارایی برای گردآوری همه آگهی‌هایتان و ساختن موجودی کالا برای همه قالب‌های آگهی قابل‌اجرا برای هدف تبلیغاتی‌تان استفاده می‌شود. برای بهینه‌سازی عملکرد آگهی‌تان، سیستم به‌طور هوشمند دارایی‌هایتان را انتخاب و ترکیب می‌کند تا به بهترین شکل با کانال Google Ads خاصی (مثل YouTube،‏ Gmail، یا «جستجو») که آگهی‌تان در آن نشان داده می‌شود مطابقت داشته باشد. درباره گروه‌های دارایی بیشتر بدانید.

گروه دارایی را نمی‌توان بین پویش‌ها هم‌رسانی کرد. هر پویش به حداقل یک گروه دارایی نیاز دارد و حداکثر ۱۰۰ گروه دارایی برای هر پویش مجاز است.

گروه‌های دارایی حاوی یک یا چند نشانی وب نهایی هستند. حداقل یک نشانی وب نهایی لازم است، به‌جز برای پویش‌های «خدمات محلی» و گروه‌های دارایی خرده‌فروشی بدون پیوندهای AssetGroupAsset سفارشی (یا فقط با دارایی‌های MEDIA_BUNDLE HTML5). از نشانی وبی استفاده کنید که بیشترین ارتباط را با مسیر تبدیل برای گروه دارایی و اهداف پویش داده‌شده دارد. نشانی وب نهایی گروه دارایی را نمی‌توان از WEBPAGE معیارهای پویش مستثنی کرد.

AssetGroup با ایجاد AssetGroupAsset جدید و ارائه موارد زیر به Asset پیوند داده می‌شود:

  • نام منبع AssetGroup
  • نام منبع Asset
  • AssetFieldType از Asset در AssetGroup

AssetGroup را می‌توان به چند شیء Asset پیوند داد. یک Asset می‌تواند به چندین گروه دارایی پیوند داده شود. یک Asset می‌تواند انواع فیلد متفاوتی در اشیاء AssetGroup مختلف داشته باشد.

برای جزئیات بیشتر درباره استفاده از شناسه‌های موقت و سفارش دادن اشیاء AssetOperation، AssetGroupOperation، و AssetGroupAssetOperation در درخواست‌های تغییر انبوه، به راهنمای درخواست‌های ساختار مراجعه کنید.

محدودیت‌ها:

  • درخواست‌های AssetGroupOperation باید اتمی باشند. از شکست جزئی پشتیبانی نمی‌شود.
  • منابع گروه دارایی را نمی‌توان در فرایند دسته‌ای بااستفاده از AssetGroupOperation اصلاح کرد. به‌جای آن، از GoogleAdsService.Mutate استاندارد با AssetGroupService برای اصلاح منابع گروه دارایی در فرایند دسته‌ای استفاده کنید.
  • AssetGroupAssetOperation ممکن است در BatchJobService برای پیوند دادن یا لغو پیوند دارایی‌ها به گروه دارایی استفاده شود.

می‌توانید بدون برآورده کردن حداقل الزامات دارایی، AssetGroup شیء در پویش‌های خرده‌فروشی «عملکرد بیشینه» ایجاد کنید. برای اینکه هم در Google Ads API و هم در میانای کاربر Google Ads پشتیبانی شود، AssetGroup در پویش خرده‌فروشی «عملکرد بیشینه» باید در یکی از دو حالت زیر باشد:

  • بدون هیچ شیء سفارشی Asset پیوندشده: به دارایی‌هایی متکی است که به‌طور خودکار از حساب Google Merchant Center پیوندشده تولید شده‌اند (final_urls و پیوندهای نمانام CampaignAsset در سطح پویش اختیاری هستند، و دارایی‌های HTML5 MEDIA_BUNDLE مستقل از فعال کردن حداقل الزامات نوشتار، تصویر، نمانام، یا final_urls معاف هستند). همچنین می‌توانید با لغو پیوند همه اشیای سفارشی AssetGroupAsset در یک درخواست، AssetGroup را به این حالت برگردانید.
  • برآورده کردن همه حداقل الزامات Asset: حاوی دارایی‌های سفارشی است، حداقل یک final_urls در AssetGroup تنظیم می‌کند (مطابق با دامنه وب‌سایت Merchant Center پیوندشده)، و همه حداقل الزامات دارایی را برآورده می‌کند (ازجمله پیوندهای BUSINESS_NAME و LOGO CampaignAsset در سطح پویش وقتی رهنمودهای نمانام فعال است).

به‌عنوان روال مطلوب، توصیه می‌کنیم دارایی‌ها را بارگذاری کنید تا دسترسی در سراسر موجودی به حداکثر برسد. بااین‌حال، باید همه دارایی‌های لازم را در یک درخواست پیوند دهید بدون استفاده از شکست جزئی، و نمی‌توانید دارایی‌ها را یکی‌یکی با درخواست‌های جداگانه به گروه‌های دارایی اضافه کنید.

جاوا

/** Creates a list of MutateOperations that create a new AssetGroup. */
private List<MutateOperation> createAssetGroupOperations(
    long customerId,
    String assetGroupResourceName,
    List<String> headlineAssetResourceNames,
    List<String> descriptionAssetResourceNames,
    boolean brandGuidelinesEnabled)
    throws IOException {
  List<MutateOperation> mutateOperations = new ArrayList<>();
  String campaignResourceName =
      ResourceNames.campaign(customerId, PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID);
  // Creates the AssetGroup.
  AssetGroup assetGroup =
      AssetGroup.newBuilder()
          .setName("Performance Max asset group #" + getPrintableDateTime())
          .setCampaign(campaignResourceName)
          .addFinalUrls("http://www.example.com")
          .addFinalMobileUrls("http://www.example.com")
          .setStatus(AssetGroupStatus.PAUSED)
          .setResourceName(assetGroupResourceName)
          .build();
  AssetGroupOperation assetGroupOperation =
      AssetGroupOperation.newBuilder().setCreate(assetGroup).build();
  mutateOperations.add(
      MutateOperation.newBuilder().setAssetGroupOperation(assetGroupOperation).build());

  // For the list of required assets for a Performance Max campaign, see
  // https://developers.google.com/google-ads/api/docs/performance-max/assets

  // An AssetGroup is linked to an Asset by creating a new AssetGroupAsset
  // and providing:
  //   the resource name of the AssetGroup
  //   the resource name of the Asset
  //   the field_type of the Asset in this AssetGroup.

  // To learn more about AssetGroups, see
  // https://developers.google.com/google-ads/api/docs/performance-max/asset-groups

  // Links the previously created multiple text assets.

  // Links the headline assets.
  for (String resourceName : headlineAssetResourceNames) {
    mutateOperations.add(
        createAssetGroupAssetMutateOperation(
            AssetFieldType.HEADLINE, resourceName, assetGroupResourceName));
  }

  // Links the description assets.
  for (String resourceName : descriptionAssetResourceNames) {
    mutateOperations.add(
        createAssetGroupAssetMutateOperation(
            AssetFieldType.DESCRIPTION, resourceName, assetGroupResourceName));
  }

  // Creates and links the long headline text asset.
  List<MutateOperation> createAndLinkTextAssetOperations =
      createAndLinkTextAsset(customerId, "Travel the World", AssetFieldType.LONG_HEADLINE);
  mutateOperations.addAll(createAndLinkTextAssetOperations);

  // Creates and links the business name and logo assets.
  List<MutateOperation> createAndLinkBrandAssets =
      createAndLinkBrandAssets(
          customerId,
          brandGuidelinesEnabled,
          "Interplanetary Cruises",
          "https://gaagl.page.link/bjYi",
          "Marketing Logo");
  mutateOperations.addAll(createAndLinkBrandAssets);

  // Creates and links the image assets.

  // Creates and links the Marketing Image Asset.
  createAndLinkTextAssetOperations =
      createAndLinkImageAsset(
          customerId,
          "https://gaagl.page.link/Eit5",
          AssetFieldType.MARKETING_IMAGE,
          "Marketing Image");
  mutateOperations.addAll(createAndLinkTextAssetOperations);

  // Creates and links the Square Marketing Image Asset.
  createAndLinkTextAssetOperations =
      createAndLinkImageAsset(
          customerId,
          "https://gaagl.page.link/bjYi",
          AssetFieldType.SQUARE_MARKETING_IMAGE,
          "Square Marketing Image");
  mutateOperations.addAll(createAndLinkTextAssetOperations);

  return mutateOperations;
}

      

C#‎

/// <summary>
/// Creates a list of MutateOperations that create a new asset_group.
/// </summary>
/// <param name="campaignResourceName">The campaign resource name.</param>
/// <param name="assetGroupResourceName">The asset group resource name.</param>
/// <param name="headlineAssetResourceNames">The headline asset resource names.</param>
/// <param name="descriptionAssetResourceNames">The description asset resource
/// names.</param>
/// <param name="resourceNameGenerator">A generator for unique temporary ID's.</param>
/// <param name="config">The Google Ads config.</param>
/// <param name="brandGuidelinesEnabled">Whether or not to enable brand guidelines.</param>
/// <returns>A list of MutateOperations that create the new asset group.</returns>
private List<MutateOperation> CreateAssetGroupOperations(
    string campaignResourceName,
    string assetGroupResourceName,
    List<string> headlineAssetResourceNames,
    List<string> descriptionAssetResourceNames,
    AssetTemporaryResourceNameGenerator resourceNameGenerator,
    GoogleAdsConfig config,
    bool brandGuidelinesEnabled)
{
    List<MutateOperation> operations = new List<MutateOperation>();

    // Create the AssetGroup
    operations.Add(
        new MutateOperation()
        {
            AssetGroupOperation = new AssetGroupOperation()
            {
                Create = new AssetGroup()
                {
                    Name = "Performance Max asset group #" +
                        ExampleUtilities.GetRandomString(),
                    Campaign = campaignResourceName,
                    FinalUrls = { "http://www.example.com" },
                    FinalMobileUrls = { "http://www.example.com" },
                    Status = AssetGroupStatus.Paused,
                    ResourceName = assetGroupResourceName
                }
            }
        }
    );

    // For the list of required assets for a Performance Max campaign, see
    // https://developers.google.com/google-ads/api/docs/performance-max/assets

    // An AssetGroup is linked to an Asset by creating a new AssetGroupAsset
    // and providing:
    //   the resource name of the AssetGroup
    //   the resource name of the Asset
    //   the field_type of the Asset in this AssetGroup.
    //
    // To learn more about AssetGroups, see
    // https://developers.google.com/google-ads/api/docs/performance-max/asset-groups

    // Link the previously created multiple text assets.

    // Link the headline assets.
    foreach (string resourceName in headlineAssetResourceNames)
    {
        operations.Add(
            new MutateOperation()
            {
                AssetGroupAssetOperation = new AssetGroupAssetOperation()
                {
                    Create = new AssetGroupAsset()
                    {
                        FieldType = AssetFieldType.Headline,
                        AssetGroup = assetGroupResourceName,
                        Asset = resourceName
                    }
                }
            }
        );
    }

    // Link the description assets.
    foreach (string resourceName in descriptionAssetResourceNames)
    {
        operations.Add(
            new MutateOperation()
            {
                AssetGroupAssetOperation = new AssetGroupAssetOperation()
                {
                    Create = new AssetGroupAsset()
                    {
                        FieldType = AssetFieldType.Description,
                        AssetGroup = assetGroupResourceName,
                        Asset = resourceName
                    }
                }
            }
        );
    }

    // Create and link the brand assets.
    operations.AddRange(
        CreateAndLinkBrandAssets(
            assetGroupResourceName,
            campaignResourceName,
            resourceNameGenerator,
            "Interplanetary Cruises",
            "https://gaagl.page.link/bjYi",
            "Marketing Logo",
            config,
            brandGuidelinesEnabled
        )
    );

    // Create and link the long headline text asset.
    operations.AddRange(
        CreateAndLinkTextAsset(
            assetGroupResourceName,
            resourceNameGenerator.Next(),
            "Travel the World",
            AssetFieldType.LongHeadline
        )
    );

    // Create and link the image assets.

    // Create and link the Marketing Image Asset.
    operations.AddRange(
        CreateAndLinkImageAsset(
            assetGroupResourceName,
            resourceNameGenerator.Next(),
            "https://gaagl.page.link/Eit5",
            AssetFieldType.MarketingImage,
            "Marketing Image",
            config
        )
    );

    // Create and link the Square Marketing Image Asset.
    operations.AddRange(
        CreateAndLinkImageAsset(
            assetGroupResourceName,
            resourceNameGenerator.Next(),
            "https://gaagl.page.link/bjYi",
            AssetFieldType.SquareMarketingImage,
            "Square Marketing Image",
            config
        )
    );

    return operations;
}

      

PHP

private static function createAssetGroupOperations(
    int $customerId,
    array $headlineAssetResourceNames,
    array $descriptionAssetResourceNames,
    bool $brandGuidelinesEnabled
): array {
    $operations = [];
    // Creates a new mutate operation that creates an asset group operation.
    $operations[] = new MutateOperation(
        [
        'asset_group_operation' => new AssetGroupOperation(
            [
            'create' => new AssetGroup(
                [
                'resource_name' => ResourceNames::forAssetGroup(
                    $customerId,
                    self::ASSET_GROUP_TEMPORARY_ID
                ),
                'name' => 'Performance Max asset group #' . Helper::getPrintableDatetime(),
                'campaign' => ResourceNames::forCampaign(
                    $customerId,
                    self::PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
                ),
                'final_urls' => ['http://www.example.com'],
                'final_mobile_urls' => ['http://www.example.com'],
                'status' => AssetGroupStatus::PAUSED
                ]
            )
            ]
        )
        ]
    );

    // For the list of required assets for a Performance Max campaign, see
    // https://developers.google.com/google-ads/api/docs/performance-max/assets

    // An AssetGroup is linked to an Asset by creating a new AssetGroupAsset
    // and providing:
    // -  the resource name of the AssetGroup
    // -  the resource name of the Asset
    // -  the field_type of the Asset in this AssetGroup
    //
    // To learn more about AssetGroups, see
    // https://developers.google.com/google-ads/api/docs/performance-max/asset-groups.

    // Links the previously created multiple text assets.

    // Links the headline assets.
    foreach ($headlineAssetResourceNames as $resourceName) {
        $operations[] = new MutateOperation(
            [
            'asset_group_asset_operation' => new AssetGroupAssetOperation(
                [
                'create' => new AssetGroupAsset(
                    [
                    'asset' => $resourceName,
                    'asset_group' => ResourceNames::forAssetGroup(
                        $customerId,
                        self::ASSET_GROUP_TEMPORARY_ID
                    ),
                    'field_type' => AssetFieldType::HEADLINE
                    ]
                )
                ]
            )
            ]
        );
    }
    // Links the description assets.
    foreach ($descriptionAssetResourceNames as $resourceName) {
        $operations[] = new MutateOperation(
            [
            'asset_group_asset_operation' => new AssetGroupAssetOperation(
                [
                'create' => new AssetGroupAsset(
                    [
                    'asset' => $resourceName,
                    'asset_group' => ResourceNames::forAssetGroup(
                        $customerId,
                        self::ASSET_GROUP_TEMPORARY_ID
                    ),
                    'field_type' => AssetFieldType::DESCRIPTION
                    ]
                )
                ]
            )
            ]
        );
    }

    // Creates and links the long headline text asset.
    $operations = array_merge(
        $operations,
        self::createAndLinkTextAsset(
            $customerId,
            'Travel the World',
            AssetFieldType::LONG_HEADLINE
        )
    );
    // Creates and links the business name text asset.
    $operations = array_merge(
        $operations,
        self::createAndLinkBrandAssets(
            $customerId,
            $brandGuidelinesEnabled,
            'Interplanetary Cruises',
            'https://gaagl.page.link/bjYi',
            'Marketing Logo'
        )
    );

    // Creates and links the image assets.

    // Creates and links the Marketing Image Asset.
    $operations = array_merge(
        $operations,
        self::createAndLinkImageAsset(
            $customerId,
            'https://gaagl.page.link/Eit5',
            AssetFieldType::MARKETING_IMAGE,
            'Marketing Image'
        )
    );
    // Creates and links the Square Marketing Image Asset.
    $operations = array_merge(
        $operations,
        self::createAndLinkImageAsset(
            $customerId,
            'https://gaagl.page.link/bjYi',
            AssetFieldType::SQUARE_MARKETING_IMAGE,
            'Square Marketing Image'
        )
    );

    return $operations;
}
      

Python

def create_asset_group_operation(
    client: GoogleAdsClient,
    customer_id: str,
    headline_asset_resource_names: List[str],
    description_asset_resource_names: List[str],
    brand_guidelines_enabled: bool,
) -> List[MutateOperation]:
    """Creates a list of MutateOperations that create a new asset_group.

    A temporary ID will be assigned to this asset group so that it can
    be referenced by other objects being created in the same Mutate request.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        headline_asset_resource_names: a list of headline resource names.
        description_asset_resource_names: a list of description resource names.
        brand_guidelines_enabled: a boolean value indicating if the campaign is
          enabled for brand guidelines.

    Returns:
        MutateOperations that create a new asset group and related assets.
    """
    asset_group_service: AssetGroupServiceClient = client.get_service(
        "AssetGroupService"
    )
    campaign_service: CampaignServiceClient = client.get_service(
        "CampaignService"
    )

    operations: List[MutateOperation] = []

    # Create the AssetGroup
    mutate_operation: MutateOperation = client.get_type("MutateOperation")
    asset_group: AssetGroup = mutate_operation.asset_group_operation.create
    asset_group.name = f"Performance Max asset group #{uuid4()}"
    asset_group.campaign = campaign_service.campaign_path(
        customer_id, _PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
    )
    asset_group.final_urls.append("http://www.example.com")
    asset_group.final_mobile_urls.append("http://www.example.com")
    asset_group.status = client.enums.AssetGroupStatusEnum.PAUSED
    asset_group.resource_name = asset_group_service.asset_group_path(
        customer_id,
        _ASSET_GROUP_TEMPORARY_ID,
    )
    operations.append(mutate_operation)

    # For the list of required assets for a Performance Max campaign, see
    # https://developers.google.com/google-ads/api/docs/performance-max/assets

    # An AssetGroup is linked to an Asset by creating a new AssetGroupAsset
    # and providing:
    #   the resource name of the AssetGroup
    #   the resource name of the Asset
    #   the field_type of the Asset in this AssetGroup.
    #
    # To learn more about AssetGroups, see
    # https://developers.google.com/google-ads/api/docs/performance-max/asset-groups

    # Link the previously created multiple text assets.

    # Link the headline assets.
    for resource_name in headline_asset_resource_names:
        mutate_operation: MutateOperation = client.get_type("MutateOperation")
        asset_group_asset: AssetGroupAsset = (
            mutate_operation.asset_group_asset_operation.create
        )
        asset_group_asset.field_type = client.enums.AssetFieldTypeEnum.HEADLINE
        asset_group_asset.asset_group = asset_group_service.asset_group_path(
            customer_id,
            _ASSET_GROUP_TEMPORARY_ID,
        )
        asset_group_asset.asset = resource_name
        operations.append(mutate_operation)

    #  Link the description assets.
    for resource_name in description_asset_resource_names:
        mutate_operation: MutateOperation = client.get_type("MutateOperation")
        asset_group_asset: AssetGroupAsset = (
            mutate_operation.asset_group_asset_operation.create
        )
        asset_group_asset.field_type = (
            client.enums.AssetFieldTypeEnum.DESCRIPTION
        )
        asset_group_asset.asset_group = asset_group_service.asset_group_path(
            customer_id,
            _ASSET_GROUP_TEMPORARY_ID,
        )
        asset_group_asset.asset = resource_name
        operations.append(mutate_operation)

    # Create and link the long headline text asset.
    mutate_operations: List[MutateOperation] = create_and_link_text_asset(
        client,
        customer_id,
        "Travel the World",
        client.enums.AssetFieldTypeEnum.LONG_HEADLINE,
    )
    operations.extend(mutate_operations)

    # Create and link the business name and logo asset.
    mutate_operations: List[MutateOperation] = create_and_link_brand_assets(
        client,
        customer_id,
        brand_guidelines_enabled,
        "Interplanetary Cruises",
        "https://gaagl.page.link/bjYi",
        "Marketing Logo",
    )
    operations.extend(mutate_operations)

    # Create and link the image assets.

    # Create and link the Marketing Image Asset.
    mutate_operations: List[MutateOperation] = create_and_link_image_asset(
        client,
        customer_id,
        "https://gaagl.page.link/Eit5",
        client.enums.AssetFieldTypeEnum.MARKETING_IMAGE,
        "Marketing Image",
    )
    operations.extend(mutate_operations)

    # Create and link the Square Marketing Image Asset.
    mutate_operations: List[MutateOperation] = create_and_link_image_asset(
        client,
        customer_id,
        "https://gaagl.page.link/bjYi",
        client.enums.AssetFieldTypeEnum.SQUARE_MARKETING_IMAGE,
        "Square Marketing Image",
    )
    operations.extend(mutate_operations)
    return operations
      

Ruby

# Creates a list of MutateOperations that create a new asset_group.
#
# A temporary ID will be assigned to this asset group so that it can
# be referenced by other objects being created in the same Mutate request.
def create_asset_group_operation(
    client,
    customer_id,
    headline_asset_resource_names,
    description_asset_resource_names,
    brand_guidelines_enabled)
  operations = []

  # Create the AssetGroup
  operations << client.operation.mutate do |m|
    m.asset_group_operation = client.operation.create_resource.asset_group do |ag|
      ag.name = "Performance Max asset group #{SecureRandom.uuid}"
      ag.campaign = client.path.campaign(
        customer_id,
        PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID)
      ag.final_urls << "http://www.example.com"
      ag.final_mobile_urls << "http://www.example.com"
      ag.status = :PAUSED
      ag.resource_name = client.path.asset_group(
        customer_id,
        ASSET_GROUP_TEMPORARY_ID)
    end
  end

  # For the list of required assets for a Performance Max campaign, see
  # https://developers.google.com/google-ads/api/docs/performance-max/assets
  #
  # An AssetGroup is linked to an Asset by creating a new AssetGroupAsset
  # and providing:
  #   the resource name of the AssetGroup
  #   the resource name of the Asset
  #   the field_type of the Asset in this AssetGroup.
  #
  # To learn more about AssetGroups, see
  # https://developers.google.com/google-ads/api/docs/performance-max/asset-groups

  # Link the previously created multiple text assets.

  # Link the headline assets.
  headline_asset_resource_names.each do |resource_name|
    operations << client.operation.mutate do |m|
      m.asset_group_asset_operation = client.operation.create_resource
          .asset_group_asset do |aga|
        aga.field_type = :HEADLINE
        aga.asset_group = client.path.asset_group(
          customer_id,
          ASSET_GROUP_TEMPORARY_ID)
        aga.asset = resource_name
      end
    end
  end

  #  Link the description assets.
  description_asset_resource_names.each do |resource_name|
    operations << client.operation.mutate do |m|
      m.asset_group_asset_operation = client.operation.create_resource
          .asset_group_asset do |aga|
        aga.field_type = :DESCRIPTION
        aga.asset_group = client.path.asset_group(
          customer_id,
          ASSET_GROUP_TEMPORARY_ID)
        aga.asset = resource_name
      end
    end
  end

  # Create and link the long headline text asset.
  operations += create_and_link_text_asset(
    client,
    customer_id,
    "Travel the World",
    :LONG_HEADLINE)

  # Create and link the business name and logo asset.
  operations += create_and_link_brand_assets(
    client,
    customer_id,
    brand_guidelines_enabled,
    "Interplanetary Cruises",
    "https://gaagl.page.link/bjYi",
    "Marketing Logo")

  # Create and link the image assets.

  # Create and link the Marketing Image Asset.
  operations += create_and_link_image_asset(
    client,
    customer_id,
    "https://gaagl.page.link/Eit5",
    :MARKETING_IMAGE,
    "Marketing Image")

  # Create and link the Square Marketing Image Asset.
  operations += create_and_link_image_asset(
    client,
    customer_id,
    "https://gaagl.page.link/bjYi",
    :SQUARE_MARKETING_IMAGE,
    "Square Marketing Image")

  operations
end
      

پرل

sub create_asset_group_operations {
  my (
    $customer_id,
    $headline_asset_resource_names,
    $description_asset_resource_names,
    $brand_guidelines_enabled
  ) = @_;

  my $operations = [];
  # Create a mutate operation that creates an asset group operation.
  push @$operations,
    Google::Ads::GoogleAds::V26::Services::GoogleAdsService::MutateOperation->
    new({
      assetGroupOperation =>
        Google::Ads::GoogleAds::V26::Services::AssetGroupService::AssetGroupOperation
        ->new({
          create => Google::Ads::GoogleAds::V26::Resources::AssetGroup->new({
              resourceName =>
                Google::Ads::GoogleAds::V26::Utils::ResourceNames::asset_group(
                $customer_id, ASSET_GROUP_TEMPORARY_ID
                ),
              name     => "Performance Max asset group #" . uniqid(),
              campaign =>
                Google::Ads::GoogleAds::V26::Utils::ResourceNames::campaign(
                $customer_id, PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
                ),
              finalUrls       => ["http://www.example.com"],
              finalMobileUrls => ["http://www.example.com"],
              status          =>
                Google::Ads::GoogleAds::V26::Enums::AssetGroupStatusEnum::PAUSED
            })})});

  # For the list of required assets for a Performance Max campaign, see
  # https://developers.google.com/google-ads/api/docs/performance-max/assets.

  # An AssetGroup is linked to an Asset by creating a new AssetGroupAsset
  # and providing:
  # - the resource name of the AssetGroup
  # - the resource name of the Asset
  # - the fieldType of the Asset in this AssetGroup
  #
  # To learn more about AssetGroups, see
  # https://developers.google.com/google-ads/api/docs/performance-max/asset-groups.

  # Link the previously created multiple text assets.

  # Link the headline assets.
  foreach my $resource_name (@$headline_asset_resource_names) {
    push @$operations,
      Google::Ads::GoogleAds::V26::Services::GoogleAdsService::MutateOperation
      ->new({
        assetGroupAssetOperation =>
          Google::Ads::GoogleAds::V26::Services::AssetGroupAssetService::AssetGroupAssetOperation
          ->new({
            create =>
              Google::Ads::GoogleAds::V26::Resources::AssetGroupAsset->new({
                asset      => $resource_name,
                assetGroup =>
                  Google::Ads::GoogleAds::V26::Utils::ResourceNames::asset_group(
                  $customer_id, ASSET_GROUP_TEMPORARY_ID
                  ),
                fieldType => HEADLINE
              })})});
  }

  # Link the description assets.
  foreach my $resource_name (@$description_asset_resource_names) {
    push @$operations,
      Google::Ads::GoogleAds::V26::Services::GoogleAdsService::MutateOperation
      ->new({
        assetGroupAssetOperation =>
          Google::Ads::GoogleAds::V26::Services::AssetGroupAssetService::AssetGroupAssetOperation
          ->new({
            create =>
              Google::Ads::GoogleAds::V26::Resources::AssetGroupAsset->new({
                asset      => $resource_name,
                assetGroup =>
                  Google::Ads::GoogleAds::V26::Utils::ResourceNames::asset_group(
                  $customer_id, ASSET_GROUP_TEMPORARY_ID
                  ),
                fieldType => DESCRIPTION
              })})});
  }

  # Create and link the long headline text asset.
  push @$operations,
    @{create_and_link_text_asset($customer_id, "Travel the World",
      LONG_HEADLINE)};

  # Create and link the business name and logo asset.
  push @$operations,
    @{
    create_and_link_brand_assets(
      $customer_id,             $brand_guidelines_enabled,
      "Interplanetary Cruises", "https://gaagl.page.link/bjYi",
      "Marketing Logo"
    )};

  # Create and link the image assets.

  # Create and link the marketing image asset.
  push @$operations,
    @{
    create_and_link_image_asset(
      $customer_id,    "https://gaagl.page.link/Eit5",
      MARKETING_IMAGE, "Marketing Image"
    )};

  # Create and link the square marketing image asset.
  push @$operations,
    @{
    create_and_link_image_asset(
      $customer_id,           "https://gaagl.page.link/bjYi",
      SQUARE_MARKETING_IMAGE, "Square Marketing Image"
    )};

  return $operations;
}
      

curl

پویش‌های «عملکرد بیشینه» خدمات محلی

کمپین‌های «عملکرد بیشینه خدمات محلی» (GLS PMax)—که GLS مخفف «خدمات محلی Google» است—چند ویژگی منحصربه‌فرد دررابطه‌با گروه‌های دارایی دارند:

  • دور زدن حداقل الزامات دارایی: برخلاف کمپین‌های استاندارد «عملکرد بیشینه»، کمپین‌های «عملکرد بیشینه» GLS برای ارائه به دارایی‌های استاندارد (مانند عنوان، شرح، یا تصویر) یا final_urls نیاز ندارند؛ پیوندهای AssetGroupAsset سفارشی پشتیبانی نمی‌شوند.
  • اطلاعات خدمات محلی Google: فراداده «آگهی‌های خدمات محلی» را در گروه دارایی با پر کردن فیلد google_local_services_info آن با پیام GoogleLocalServicesInfo پیکربندی کنید:
    • category_id (رشته، تغییرناپذیر): شناسه دسته «خدمات محلی» را (در قالب XCAT، برای مثال، xcat:service_area_business_plumber) مشخص می‌کند. برای پیوست کردن هدف‌های local_services_id AssetGroupSignal (که شناسه سرویس را دربرابر category_id اعتبارسنجی می‌کنند) یا callouts الزامی است، و پس‌از ایجاد شدن AssetGroup تغییرناپذیر است.
    • callouts (repeated LocalServicesCallout): selected callouts to show, each referencing a valid callout_id.
      • اعتبارسنجی: API اعتبارسنجی سمت سرور را انجام می‌دهد تا مطمئن شود که هر callout_id ارائه‌شده برای دسته و منطقه خاص آگهی‌دهنده معتبر است.
      • تغییرپذیری: درحالی‌که category_id تغییرناپذیر است، فهرست callouts کاملاً تغییرپذیر است. می‌توانید در عملیات به‌روزرسانی بعدی، توضیحات را اضافه، جایگزین، یا پاک کنید (با ارسال فهرست خالی یا نمونه پیش‌فرض به ماسک فیلد google_local_services_info.callouts).

پیش‌نمایش آگهی‌ها برای گروه‌های دارایی

پس‌از ایجاد گروه‌های دارایی و پیوند دادن دارایی‌ها به آن‌ها، می‌توانید پیش‌نمایش هم‌رسانی‌کردنی تولید کنید تا نشان دهید آگهی‌های ایجادشده از هر گروه دارایی چگونه به‌نظر می‌رسند.

با ارسال شناسه‌های گروه دارایی به ShareablePreviewService.GenerateShareablePreviews، می‌توانید نشانی‌های وب پیش‌نمایش‌های آگهی را برای هم‌رسانی با کاربران خود، همراه با مُهر زمان انقضای آن‌ها، بازیابی کنید.

چندین گروه دارایی

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