बेहतरीन परफ़ॉर्मेंस में मदद करने वाले कैंपेन के एसेट ग्रुप

परफ़ॉर्मेंस मैक्स कैंपेन के ऐसेट ग्रुप में, वे इमेज, हेडलाइन, ब्यौरे, और वीडियो शामिल होते हैं जिन्हें परफ़ॉर्मेंस मैक्स कैंपेन बनाते समय जोड़ा जाता है. आपके विज्ञापन की परफ़ॉर्मेंस को ऑप्टिमाइज़ करने के लिए, सिस्टम आपकी ऐसेट को समझदारी से चुनता है और उन्हें जोड़ता है. इससे, Google Ads के उस चैनल (जैसे, YouTube, Gmail या Search) के हिसाब से सबसे सही ऐसेट कॉम्बिनेशन बनता है जहां आपका विज्ञापन दिखाया जाता है.

किसी ऐसेट ग्रुप को एक से ज़्यादा कैंपेन के साथ शेयर नहीं किया जा सकता. हर कैंपेन के लिए, कम से कम एक ऐसेट ग्रुप की ज़रूरत होती है. हर कैंपेन के लिए, ज़्यादा से ज़्यादा 100 ऐसेट ग्रुप बनाए जा सकते हैं.

ऐसेट ग्रुप

एक ऐसेट ग्रुप ऐसेट का कलेक्शन होता है. यह किसी थीम या किसी टारगेट ऑडियंस पर आधारित होता है. ऐसेट ग्रुप का इस्तेमाल, विज्ञापन बनाने और विज्ञापन के लक्ष्य के हिसाब से सभी विज्ञापन फ़ॉर्मैट के लिए इन्वेंट्री बनाने में किया जाता है. ऐसेट ग्रुप के बारे में ज़्यादा जानें.

ऐसेट ग्रुप में एक या उससे ज़्यादा फ़ाइनल यूआरएल शामिल होते हैं. कम से कम एक फ़ाइनल यूआरएल ज़रूरी है. दिए गए ऐसेट ग्रुप और कैंपेन के लक्ष्यों के लिए, कन्वर्ज़न पाथ से सबसे ज़्यादा काम का यूआरएल इस्तेमाल करें. ऐसेट ग्रुप के फ़ाइनल यूआरएल को WEBPAGE कैंपेन के मानदंड से बाहर नहीं रखा जा सकता.

नया AssetGroupAsset बनाकर और ये जानकारी देकर, AssetGroup को Asset से लिंक किया जाता है:

  • AssetGroup का संसाधन नाम
  • Asset का संसाधन नाम
  • AssetFieldType का Asset में मौजूद AssetGroup

किसी AssetGroup को एक से ज़्यादा Asset ऑब्जेक्ट से लिंक किया जा सकता है. किसी Asset को एक से ज़्यादा ऐसेट ग्रुप से लिंक किया जा सकता है. एक Asset के अलग-अलग AssetGroup ऑब्जेक्ट में, अलग-अलग फ़ील्ड टाइप हो सकते हैं.

पाबंदियां:

  • AssetGroupOperation के अनुरोध, एटॉमिक होने चाहिए. आंशिक तौर पर गड़बड़ी होने पर, अनुरोध को पूरा नहीं किया जा सकता.
  • ऐसेट ग्रुप के संसाधनों में, बैच प्रोसेस का इस्तेमाल करके बदलाव नहीं किया जा सकता AssetGroupOperation. इसके बजाय, बैच प्रोसेस में ऐसेट ग्रुप के संसाधनों में बदलाव करने के लिए, AssetGroupService के साथ स्टैंडर्ड GoogleAdsService.Mutate का इस्तेमाल करें.
  • किसी ऐसेट ग्रुप से ऐसेट को लिंक या अनलिंक करने के लिए, BatchJobService में AssetGroupAssetOperation का इस्तेमाल किया जा सकता है.

परफ़ॉर्मेंस मैक्स के रीटेल कैंपेन में, ऐसेट से जुड़ी ज़रूरी शर्तों को पूरा किए बिना AssetGroup ऑब्जेक्ट बनाए जा सकते हैं . हालांकि, किसी भी परफ़ॉर्मेंस मैक्स कैंपेन में, AssetGroupAsset का इस्तेमाल करके किसी Asset को AssetGroup से लिंक करने की कोशिश करने पर, ऐसेट से जुड़ी सभी ज़रूरी शर्तें लागू हो जाती हैं. दूसरे शब्दों में, परफ़ॉर्मेंस मैक्स के रीटेल कैंपेन में AssetGroup ऑब्जेक्ट सिर्फ़ दो स्थितियों में मौजूद हो सकते हैं:

  • लिंक किए गए Asset ऑब्जेक्ट के बिना
  • Asset से जुड़ी सभी ज़रूरी शर्तें पूरी करने पर

हमारा सुझाव है कि सभी इन्वेंट्री पर ज़्यादा से ज़्यादा लोगों तक पहुंचने के लिए, ऐसेट अपलोड करें. हालांकि, आपको आंशिक तौर पर गड़बड़ी होने पर भी, सभी ज़रूरी ऐसेट को एक ही अनुरोध में लिंक करना होगा साथ ही, अलग-अलग अनुरोधों के साथ, ऐसेट ग्रुप में एक-एक करके ऐसेट नहीं जोड़ी जा सकतीं.

Java

/** 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
      

Perl

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::V24::Services::GoogleAdsService::MutateOperation->
    new({
      assetGroupOperation =>
        Google::Ads::GoogleAds::V24::Services::AssetGroupService::AssetGroupOperation
        ->new({
          create => Google::Ads::GoogleAds::V24::Resources::AssetGroup->new({
              resourceName =>
                Google::Ads::GoogleAds::V24::Utils::ResourceNames::asset_group(
                $customer_id, ASSET_GROUP_TEMPORARY_ID
                ),
              name     => "Performance Max asset group #" . uniqid(),
              campaign =>
                Google::Ads::GoogleAds::V24::Utils::ResourceNames::campaign(
                $customer_id, PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
                ),
              finalUrls       => ["http://www.example.com"],
              finalMobileUrls => ["http://www.example.com"],
              status          =>
                Google::Ads::GoogleAds::V24::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::V24::Services::GoogleAdsService::MutateOperation
      ->new({
        assetGroupAssetOperation =>
          Google::Ads::GoogleAds::V24::Services::AssetGroupAssetService::AssetGroupAssetOperation
          ->new({
            create =>
              Google::Ads::GoogleAds::V24::Resources::AssetGroupAsset->new({
                asset      => $resource_name,
                assetGroup =>
                  Google::Ads::GoogleAds::V24::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::V24::Services::GoogleAdsService::MutateOperation
      ->new({
        assetGroupAssetOperation =>
          Google::Ads::GoogleAds::V24::Services::AssetGroupAssetService::AssetGroupAssetOperation
          ->new({
            create =>
              Google::Ads::GoogleAds::V24::Resources::AssetGroupAsset->new({
                asset      => $resource_name,
                assetGroup =>
                  Google::Ads::GoogleAds::V24::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

Local Services के परफ़ॉर्मेंस मैक्स कैंपेन

Local Services के परफ़ॉर्मेंस मैक्स (जीएलएस पीमैक्स) कैंपेन—यहां जीएलएस का मतलब है Google Local Services—के ऐसेट ग्रुप से जुड़ी कई खास विशेषताएं हैं:

  • ऐसेट से जुड़ी ज़रूरी शर्तों को पूरा न करना: स्टैंडर्ड परफ़ॉर्मेंस मैक्स कैंपेन के उलट, जीएलएस पीमैक्स कैंपेन के लिए, स्टैंडर्ड ऐसेट (जैसे, हेडलाइन, ब्यौरे या इमेज) की ज़रूरत नहीं होती. इसलिए, AssetGroup ऑब्जेक्ट को, उससे जुड़े AssetGroupAsset ऑब्जेक्ट के बिना भी बनाया जा सकता है.
  • Google Local Services की जानकारी: किसी ऐसेट ग्रुप पर, Local Services Ads का मेटाडेटा कॉन्फ़िगर किया जा सकता है. इसके लिए, उसके google_local_services_info फ़ील्ड में GoogleLocalServicesInfo मैसेज भरें:
    • category_id (स्ट्रिंग, इम्यूटेबल, ज़रूरी नहीं): Local Services की कैटगरी का आईडी (XCAT फ़ॉर्मैट में, जैसे कि xcat:service_area_business_plumber) बताता है. यह फ़ील्ड इम्यूटेबल है और AssetGroup बनाने के बाद, इसमें बदलाव नहीं किया जा सकता.
    • callouts (बार-बार इस्तेमाल होने वाला LocalServicesCallout): दिखाए जाने के लिए चुने गए कॉलआउट. इनमें से हर कॉलआउट, मान्य callout_id को रेफ़र करता है.
      • पुष्टि करना: एपीआई, सर्वर-साइड से होने वाली पुष्टि करता है, ताकि यह पक्का किया जा सके कि दिया गया callout_id विज्ञापन देने वाले की खास कैटगरी और स्थानीय भाषा के लिए मान्य है.
      • म्यूटेबिलिटी: category_id इम्यूटेबल है. हालांकि, callouts की सूची में पूरी तरह से बदलाव किया जा सकता है. अपडेट करने की अगली कार्रवाइयों में, कॉलआउट जोड़े, बदले या हटाए जा सकते हैं. इसके लिए, फ़ील्ड मास्क google_local_services_info.callouts में खाली सूची या डिफ़ॉल्ट इंस्टेंस पास करें.

ऐसेट ग्रुप के लिए विज्ञापनों की झलक देखना

ऐसेट ग्रुप बनाने और उन्हें ऐसेट से लिंक करने के बाद, शेयर की जा सकने वाली झलक जनरेट की जा सकती है. इससे यह दिखाया जा सकता है कि हर ऐसेट ग्रुप से बनाए गए विज्ञापन कैसे दिखते हैं.

ShareablePreviewService.GenerateShareablePreviews में, ऐसेट ग्रुप के आईडी पास करके, विज्ञापन की झलक के यूआरएल वापस पाए जा सकते हैं. इन्हें अपने उपयोगकर्ताओं के साथ शेयर किया जा सकता है. साथ ही, इनकी समयसीमा खत्म होने का टाइमस्टैंप भी पाया जा सकता है.

एक से ज़्यादा ऐसेट ग्रुप

अगर ऐसेट इतनी सामान्य नहीं हैं कि उन्हें डोमेन में मौजूद सभी यूआरएल पर इस्तेमाल किया जा सके और यूआरएल एक्सपैंशन का इस्तेमाल किया जा रहा है, तो अलग-अलग फ़ाइनल यूआरएल के लिए यूनीक ऐसेट ग्रुप बनाए जा सकते हैं.

साथ ही, अगर आपको ऑडियंस के हिसाब से अपनी ऐसेट को कस्टमाइज़ करना है, तो एक ही फ़ाइनल यूआरएल के लिए कई ऐसेट ग्रुप बनाए जा सकते हैं. हर थीम के लिए, एक से ज़्यादा ऐसेट ग्रुप भी बनाए जा सकते हैं.