প্রচারের মানদণ্ড তৈরি করুন

Get সাজেশনে , আমরা দেখিয়েছি কিভাবে একটি শব্দ বা বাক্যাংশ ব্যবহার করে KeywordThemeConstant বস্তুর একটি সেট পুনরুদ্ধার করা যায়। এই ধাপে, আমরা লক্ষ্য করার জন্য স্মার্ট ক্যাম্পেইনের জন্য CampaignCriterion অবজেক্টের একটি সেট তৈরি করতে একই কীওয়ার্ড থিম কনস্ট্যান্ট ব্যবহার করি।

একটি বাজেট তৈরি করার সময় আমরা যেভাবে SmartCampaignSuggestService দ্বারা প্রস্তাবিত বাজেটের পরিমাণ ব্যবহার করেছি, আমরা সুপারিশ করি যে আপনি পরামর্শ নিন-KeywordThemeConstantService থেকে প্রাপ্ত কীওয়ার্ড থিম ধ্রুবকের উপর ভিত্তি করে প্রচারের মানদণ্ড তৈরি করুন৷

এখানে স্মার্ট প্রচারের মানদণ্ডের মূল প্রয়োজনীয়তা রয়েছে:

  • স্মার্ট প্রচারাভিযান শুধুমাত্র নিম্নলিখিত মানদণ্ডের ধরন সমর্থন করে:

  • অবস্থান টার্গেটিং এর জন্য, যদি একটি অবস্থান নির্দিষ্ট করা না থাকে তবে লক্ষ্যমাত্রা সমস্ত অঞ্চলকে অন্তর্ভুক্ত করতে ডিফল্ট হবে।

  • একাধিক location মানদণ্ড একটি স্মার্ট প্রচারাভিযানের সাথে যুক্ত করা যেতে পারে, তবে শুধুমাত্র একটি proximity মানদণ্ড ব্যবহার করা যেতে পারে।

  • location এবং proximity টার্গেটিং উভয়ই ব্যবহার করা সম্ভব নয়।

নিম্নলিখিত উদাহরণে, কীওয়ার্ড থিম ধ্রুবকগুলি KeywordThemeInfo.keyword_theme_constant ক্ষেত্রে তাদের সম্পদের নাম সেট করে KeywordThemeInfo অবজেক্টে রূপান্তরিত হয়েছে। আমরা পূর্ববর্তী ধাপে প্রচারাভিযানে সেট করা অস্থায়ী সম্পদের নাম ব্যবহার করে campaign ক্ষেত্র সেট করি।

জাভা

/**
 * Creates {@link com.google.ads.googleads.v16.resources.CampaignCriterion} operations for add
 * each {@link KeywordThemeInfo}.
 */
private Collection<? extends MutateOperation> createCampaignCriterionOperations(
    long customerId,
    List<KeywordThemeInfo> keywordThemeInfos,
    SmartCampaignSuggestionInfo suggestionInfo) {
  List<MutateOperation> keywordThemeOperations =
      keywordThemeInfos.stream()
          .map(
              keywordTheme -> {
                MutateOperation.Builder builder = MutateOperation.newBuilder();
                builder
                    .getCampaignCriterionOperationBuilder()
                    .getCreateBuilder()
                    .setCampaign(ResourceNames.campaign(customerId, SMART_CAMPAIGN_TEMPORARY_ID))
                    .setKeywordTheme(keywordTheme);
                return builder.build();
              })
          .collect(Collectors.toList());

  List<MutateOperation> locationOperations =
      suggestionInfo.getLocationList().getLocationsList().stream()
          .map(
              location -> {
                MutateOperation.Builder builder = MutateOperation.newBuilder();
                builder
                    .getCampaignCriterionOperationBuilder()
                    .getCreateBuilder()
                    .setCampaign(ResourceNames.campaign(customerId, SMART_CAMPAIGN_TEMPORARY_ID))
                    .setLocation(location);
                return builder.build();
              })
          .collect(Collectors.toList());

  return Stream.concat(keywordThemeOperations.stream(), locationOperations.stream())
      .collect(Collectors.toList());
}
      

সি#

/// <summary>
/// Creates a list of MutateOperations that create new campaign criteria.
/// </summary>
/// <param name="customerId">The Google Ads customer ID.</param>
/// <param name="keywordThemeInfos">A list of KeywordThemeInfos.</param>
/// <param name="suggestionInfo">A SmartCampaignSuggestionInfo instance.</param>
/// <returns>A list of MutateOperations that create new campaign criteria.</returns>
private IEnumerable<MutateOperation> CreateCampaignCriterionOperations(long customerId,
    IEnumerable<KeywordThemeInfo> keywordThemeInfos, SmartCampaignSuggestionInfo
    suggestionInfo)
{
    List<MutateOperation> mutateOperations = keywordThemeInfos.Select(
        keywordThemeInfo => new MutateOperation
        {
            CampaignCriterionOperation = new CampaignCriterionOperation
            {
                Create = new CampaignCriterion
                {
                    // Set the campaign ID to a temporary ID.
                    Campaign = ResourceNames.Campaign(
                        customerId, SMART_CAMPAIGN_TEMPORARY_ID),
                    // Set the keyword theme to each KeywordThemeInfo in turn.
                    KeywordTheme = keywordThemeInfo,
                }
            }
        }).ToList();

    // Create a location criterion for each location in the suggestion info.
    mutateOperations.AddRange(
        suggestionInfo.LocationList.Locations.Select(
            locationInfo => new MutateOperation()
            {
                CampaignCriterionOperation = new CampaignCriterionOperation()
                {
                    Create = new CampaignCriterion()
                    {
                        // Set the campaign ID to a temporary ID.
                        Campaign = ResourceNames.Campaign(customerId,
                            SMART_CAMPAIGN_TEMPORARY_ID),
                        // Set the location to the given location.
                        Location = locationInfo
                    }
                }
            }).ToList()
    );
    return mutateOperations;
}
      

পিএইচপি

private static function createCampaignCriterionOperations(
    int $customerId,
    array $keywordThemeInfos,
    SmartCampaignSuggestionInfo $smartCampaignSuggestionInfo
): array {
    $operations = [];
    foreach ($keywordThemeInfos as $info) {
        // Creates the campaign criterion object.
        $campaignCriterion = new CampaignCriterion([
            // Sets the campaign ID to a temporary ID.
            'campaign' =>
                ResourceNames::forCampaign($customerId, self::SMART_CAMPAIGN_TEMPORARY_ID),
            // Sets the keyword theme to the given KeywordThemeInfo.
            'keyword_theme' => $info
        ]);

        // Creates the MutateOperation that creates the campaign criterion and adds it to the
        // list of operations.
        $operations[] = new MutateOperation([
            'campaign_criterion_operation' => new CampaignCriterionOperation([
                'create' => $campaignCriterion
            ])
        ]);
    }

    // Create a location criterion for each location in the suggestion info object to add
    // corresponding location targeting to the Smart campaign.
    foreach ($smartCampaignSuggestionInfo->getLocationList()->getLocations() as $location) {
        // Creates the campaign criterion object.
        $campaignCriterion = new CampaignCriterion([
            // Sets the campaign ID to a temporary ID.
            'campaign' =>
                ResourceNames::forCampaign($customerId, self::SMART_CAMPAIGN_TEMPORARY_ID),
            // Set the location to the given location.
            'location' => $location
        ]);

        // Creates the MutateOperation that creates the campaign criterion and adds it to the
        // list of operations.
        $operations[] = new MutateOperation([
            'campaign_criterion_operation' => new CampaignCriterionOperation([
                'create' => $campaignCriterion
            ])
        ]);
    }

    return $operations;
}
      

পাইথন

def create_campaign_criterion_operations(
    client, customer_id, keyword_theme_infos, suggestion_info
):
    """Creates a list of MutateOperations that create new campaign criteria.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        keyword_theme_infos: a list of KeywordThemeInfos.
        suggestion_info: A SmartCampaignSuggestionInfo instance.

    Returns:
        a list of MutateOperations that create new campaign criteria.
    """
    campaign_service = client.get_service("CampaignService")

    operations = []
    for info in keyword_theme_infos:
        mutate_operation = client.get_type("MutateOperation")
        campaign_criterion = (
            mutate_operation.campaign_criterion_operation.create
        )
        # Set the campaign ID to a temporary ID.
        campaign_criterion.campaign = campaign_service.campaign_path(
            customer_id, _SMART_CAMPAIGN_TEMPORARY_ID
        )
        # Set the keyword theme to the given KeywordThemeInfo.
        campaign_criterion.keyword_theme = info
        # Add the mutate operation to the list of other operations.
        operations.append(mutate_operation)

    # Create a location criterion for each location in the suggestion info
    # object to add corresponding location targeting to the Smart campaign
    for location_info in suggestion_info.location_list.locations:
        mutate_operation = client.get_type("MutateOperation")
        campaign_criterion = (
            mutate_operation.campaign_criterion_operation.create
        )
        # Set the campaign ID to a temporary ID.
        campaign_criterion.campaign = campaign_service.campaign_path(
            customer_id, _SMART_CAMPAIGN_TEMPORARY_ID
        )
        # Set the location to the given location.
        campaign_criterion.location = location_info
        # Add the mutate operation to the list of other operations.
        operations.append(mutate_operation)

    return operations
      

রুবি

# Creates a list of mutate_operations that create new campaign criteria.
def create_campaign_criterion_operations(
  client,
  customer_id,
  keyword_theme_infos,
  suggestion_info)
  operations = []

  keyword_theme_infos.each do |info|
    operations << client.operation.mutate do |m|
      m.campaign_criterion_operation =
        client.operation.create_resource.campaign_criterion do |cc|
        # Sets the campaign ID to a temporary ID.
        cc.campaign = client.path.campaign(
          customer_id, SMART_CAMPAIGN_TEMPORARY_ID)
        # Sets the keyword theme to the given keyword_theme_info.
        cc.keyword_theme = info
      end
    end
  end

  # Create a location criterion for each location in the suggestion info object
  # to add corresponding location targeting to the Smart campaign
  suggestion_info.location_list.locations.each do |location|
    operations << client.operation.mutate do |m|
      m.campaign_criterion_operation =
        client.operation.create_resource.campaign_criterion do |cc|
        # Sets the campaign ID to a temporary ID.
        cc.campaign = client.path.campaign(
          customer_id, SMART_CAMPAIGN_TEMPORARY_ID)
        # Sets the location to the given location.
        cc.location = location
      end
    end
  end

  operations
end
      

পার্ল

# Creates a list of MutateOperations that create new campaign criteria.
sub _create_campaign_criterion_operations {
  my ($customer_id, $keyword_theme_infos, $suggestion_info) = @_;

  my $campaign_criterion_operations = [];

  foreach my $keyword_theme_info (@$keyword_theme_infos) {
    push @$campaign_criterion_operations,
      Google::Ads::GoogleAds::V16::Services::GoogleAdsService::MutateOperation
      ->new({
        campaignCriterionOperation =>
          Google::Ads::GoogleAds::V16::Services::CampaignCriterionService::CampaignCriterionOperation
          ->new({
            create =>
              Google::Ads::GoogleAds::V16::Resources::CampaignCriterion->new({
                # Set the campaign ID to a temporary ID.
                campaign =>
                  Google::Ads::GoogleAds::V16::Utils::ResourceNames::campaign(
                  $customer_id, SMART_CAMPAIGN_TEMPORARY_ID
                  ),
                # Set the keyword theme to the given KeywordThemeInfo.
                keywordTheme => $keyword_theme_info
              })})});
  }

  # Create a location criterion for each location in the suggestion info object
  # to add corresponding location targeting to the Smart campaign.
  foreach my $location_info (@{$suggestion_info->{locationList}{locations}}) {
    push @$campaign_criterion_operations,
      Google::Ads::GoogleAds::V16::Services::GoogleAdsService::MutateOperation
      ->new({
        campaignCriterionOperation =>
          Google::Ads::GoogleAds::V16::Services::CampaignCriterionService::CampaignCriterionOperation
          ->new({
            create =>
              Google::Ads::GoogleAds::V16::Resources::CampaignCriterion->new({
                # Set the campaign ID to a temporary ID.
                campaign =>
                  Google::Ads::GoogleAds::V16::Utils::ResourceNames::campaign(
                  $customer_id, SMART_CAMPAIGN_TEMPORARY_ID
                  ),
                # Set the location to the given location.
                location => $location_info
              })})});
  }

  return $campaign_criterion_operations;
}
      

নেতিবাচক কীওয়ার্ড থিম প্রচারের মানদণ্ড

একটি স্মার্ট প্রচারাভিযানে একটি কীওয়ার্ড থিম প্রচারাভিযানের মানদণ্ডকে নেতিবাচকভাবে লক্ষ্য করতে, আপনাকে একটি KeywordThemeInfo উদাহরণে free_form_keyword_theme ফিল্ড সেট করে একটি ফ্রি-ফর্ম কীওয়ার্ড থিম ব্যবহার করতে হবে।

নেতিবাচক কীওয়ার্ড থিম মানদণ্ড ইতিবাচক কীওয়ার্ড থিম মানদণ্ড থেকে ভিন্নভাবে আচরণ করে। যেখানে একটি ইতিবাচক কীওয়ার্ড থিম মানদণ্ড স্বয়ংক্রিয়ভাবে অন্যান্য অনুরূপ মানদণ্ডকে লক্ষ্য করার জন্য সামঞ্জস্য করা হয়, একটি নেতিবাচক কীওয়ার্ড থিম মানদণ্ড শুধুমাত্র সঠিক প্রদত্ত শব্দটিকে নেতিবাচকভাবে লক্ষ্য করার জন্য সীমাবদ্ধ থাকে। আচরণটি কীভাবে একটি নেতিবাচক বাক্যাংশের সাথে মিল কীওয়ার্ড আচরণ করে তার সমতুল্য।