ম্যানুয়ালি বিড সেট করুন

প্রচারাভিযান অনুক্রমের বিভিন্ন স্তরে বিড সেট করা যেতে পারে: প্রচারাভিযান, বিজ্ঞাপন গোষ্ঠী বা বিজ্ঞাপন গোষ্ঠীর মানদণ্ড। একটি নিম্ন স্তরে সেট করা একটি বিড উচ্চ স্তরে সেটগুলিকে ওভাররাইড করে৷ উদাহরণস্বরূপ, একটি প্রচারাভিযানের মধ্যে একটি পৃথক বিজ্ঞাপন গোষ্ঠীর উপর সেট করা বিড প্রচার-স্তরের বিড কৌশলের বিডকে ওভাররাইড করবে।

বিড আপডেট করুন

বিভিন্ন ধরনের একাধিক বিড একযোগে সেট করা যেতে পারে; উদাহরণস্বরূপ, cpc_bid_micros এবং cpm_bid_micros উভয়ই সেট করা যেতে পারে, তবে শুধুমাত্র নির্বাচিত বিডিং কৌশলের জন্য প্রাসঙ্গিক বিড ব্যবহার করা হয়।

বিডগুলি আপডেট করার সময়, আপনি যে বিডগুলি আপডেট করতে চান তা অন্তর্ভুক্ত করতে পারেন৷ Google Ads তারপর সেই বিডগুলি আপডেট করবে, কিন্তু অন্য বিডগুলিকে পরিবর্তন করবে না, যোগ করবে না বা সরিয়ে দেবে না।

নিম্নলিখিত কোড উদাহরণ একটি বিদ্যমান বিজ্ঞাপন গোষ্ঠীর CPC বিড আপডেট করে৷

জাভা

public static void main(String[] args) {
  UpdateAdGroupParams params = new UpdateAdGroupParams();
  if (!params.parseArguments(args)) {

    // Either pass the required parameters for this example on the command line, or insert them
    // into the code here. See the parameter class definition above for descriptions.
    params.customerId = Long.parseLong("INSERT_CUSTOMER_ID_HERE");
    params.adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");
    params.cpcBidMicroAmount = Long.parseLong("INSERT_CPC_BID_MICRO_AMOUNT_HERE");
  }

  GoogleAdsClient googleAdsClient = null;
  try {
    googleAdsClient = GoogleAdsClient.newBuilder().fromPropertiesFile().build();
  } catch (FileNotFoundException fnfe) {
    System.err.printf(
        "Failed to load GoogleAdsClient configuration from file. Exception: %s%n", fnfe);
    System.exit(1);
  } catch (IOException ioe) {
    System.err.printf("Failed to create GoogleAdsClient. Exception: %s%n", ioe);
    System.exit(1);
  }

  try {
    new UpdateAdGroup()
        .runExample(
            googleAdsClient, params.customerId, params.adGroupId, params.cpcBidMicroAmount);
  } catch (GoogleAdsException gae) {
    // GoogleAdsException is the base class for most exceptions thrown by an API request.
    // Instances of this exception have a message and a GoogleAdsFailure that contains a
    // collection of GoogleAdsErrors that indicate the underlying causes of the
    // GoogleAdsException.
    System.err.printf(
        "Request ID %s failed due to GoogleAdsException. Underlying errors:%n",
        gae.getRequestId());
    int i = 0;
    for (GoogleAdsError googleAdsError : gae.getGoogleAdsFailure().getErrorsList()) {
      System.err.printf("  Error %d: %s%n", i++, googleAdsError);
    }
    System.exit(1);
  }
}
      

সি#

public void Run(GoogleAdsClient client, long customerId, long adGroupId,
    long? cpcBidMicroAmount)
{
    AdGroupServiceClient adGroupService = client.GetService(Services.V16.AdGroupService);

    // Create an ad group with the specified ID.
    AdGroup adGroup = new AdGroup();
    adGroup.ResourceName = ResourceNames.AdGroup(customerId, adGroupId);

    // Pause the ad group.
    adGroup.Status = AdGroupStatusEnum.Types.AdGroupStatus.Paused;

    // Update the CPC bid if specified.
    if (cpcBidMicroAmount != null)
    {
        adGroup.CpcBidMicros = cpcBidMicroAmount.Value;
    }

    // Create the operation.
    AdGroupOperation operation = new AdGroupOperation()
    {
        Update = adGroup,
        UpdateMask = FieldMasks.AllSetFieldsOf(adGroup)
    };

    try
    {
        // Update the ad group.
        MutateAdGroupsResponse retVal = adGroupService.MutateAdGroups(
            customerId.ToString(), new AdGroupOperation[] { operation });

        // Display the results.
        MutateAdGroupResult adGroupResult = retVal.Results[0];

        Console.WriteLine($"Ad group with resource name '{adGroupResult.ResourceName}' " +
            "was updated.");
    }
    catch (GoogleAdsException e)
    {
        Console.WriteLine("Failure:");
        Console.WriteLine($"Message: {e.Message}");
        Console.WriteLine($"Failure: {e.Failure}");
        Console.WriteLine($"Request ID: {e.RequestId}");
        throw;
    }
}
      

পিএইচপি

public static function runExample(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    int $adGroupId,
    $bidMicroAmount
) {
    // Creates an ad group object with the specified resource name and other changes.
    $adGroup = new AdGroup([
        'resource_name' => ResourceNames::forAdGroup($customerId, $adGroupId),
        'cpc_bid_micros' => $bidMicroAmount,
        'status' => AdGroupStatus::PAUSED
    ]);

    // Constructs an operation that will update the ad group with the specified resource name,
    // using the FieldMasks utility to derive the update mask. This mask tells the Google Ads
    // API which attributes of the ad group you want to change.
    $adGroupOperation = new AdGroupOperation();
    $adGroupOperation->setUpdate($adGroup);
    $adGroupOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroup));

    // Issues a mutate request to update the ad group.
    $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient();
    $response = $adGroupServiceClient->mutateAdGroups(MutateAdGroupsRequest::build(
        $customerId,
        [$adGroupOperation]
    ));

    // Prints the resource name of the updated ad group.
    /** @var AdGroup $updatedAdGroup */
    $updatedAdGroup = $response->getResults()[0];
    printf(
        "Updated ad group with resource name: '%s'%s",
        $updatedAdGroup->getResourceName(),
        PHP_EOL
    );
}
      

পাইথন

def main(client, customer_id, ad_group_id, cpc_bid_micro_amount):
    ad_group_service = client.get_service("AdGroupService")

    # Create ad group operation.
    ad_group_operation = client.get_type("AdGroupOperation")
    ad_group = ad_group_operation.update
    ad_group.resource_name = ad_group_service.ad_group_path(
        customer_id, ad_group_id
    )
    ad_group.status = client.enums.AdGroupStatusEnum.PAUSED
    ad_group.cpc_bid_micros = cpc_bid_micro_amount
    client.copy_from(
        ad_group_operation.update_mask,
        protobuf_helpers.field_mask(None, ad_group._pb),
    )

    # Update the ad group.
    ad_group_response = ad_group_service.mutate_ad_groups(
        customer_id=customer_id, operations=[ad_group_operation]
    )

    print(f"Updated ad group {ad_group_response.results[0].resource_name}.")
      

রুবি

def update_ad_group(customer_id, ad_group_id, bid_micro_amount)
  # GoogleAdsClient will read a config file from
  # ENV['HOME']/google_ads_config.rb when called without parameters
  client = Google::Ads::GoogleAds::GoogleAdsClient.new

  resource_name = client.path.ad_group(customer_id, ad_group_id)

  operation = client.operation.update_resource.ad_group(resource_name) do |ag|
    ag.status = :PAUSED
    ag.cpc_bid_micros = bid_micro_amount
  end

  response = client.service.ad_group.mutate_ad_groups(
    customer_id: customer_id,
    operations: [operation],
  )

  puts "Ad group with resource name = '#{response.results.first.resource_name}' was updated."
end
      

পার্ল

sub update_ad_group {
  my ($api_client, $customer_id, $ad_group_id, $cpc_bid_micro_amount) = @_;

  # Create an ad group with the proper resource name and any other changes.
  my $ad_group = Google::Ads::GoogleAds::V16::Resources::AdGroup->new({
      resourceName =>
        Google::Ads::GoogleAds::V16::Utils::ResourceNames::ad_group(
        $customer_id, $ad_group_id
        ),
      status       => PAUSED,
      cpcBidMicros => $cpc_bid_micro_amount
    });

  # Create an ad group operation for update, using the FieldMasks utility to
  # derive the update mask.
  my $ad_group_operation =
    Google::Ads::GoogleAds::V16::Services::AdGroupService::AdGroupOperation->
    new({
      update     => $ad_group,
      updateMask => all_set_fields_of($ad_group)});

  # Update the ad group.
  my $ad_groups_response = $api_client->AdGroupService()->mutate({
      customerId => $customer_id,
      operations => [$ad_group_operation]});

  printf "Updated ad group with resource name: '%s'.\n",
    $ad_groups_response->{results}[0]{resourceName};

  return 1;
}
      

বিডগুলি সরান

একটি বিড অপসারণ করতে, এর ক্ষেত্রটি null এ আপডেট করুন।

ডিসপ্লে নেটওয়ার্ক মানদণ্ডের মাত্রা

ডিসপ্লে নেটওয়ার্কে চলমান বিজ্ঞাপনের জন্য, বিভিন্ন মাত্রা রয়েছে যার জন্য একটি বিজ্ঞাপন গোষ্ঠী বিড সেট করা যেতে পারে। যদি একাধিক বিড বিভিন্ন মাত্রায় সেট করা হয়, তাহলে display_custom_bid_dimension ক্ষেত্রটি পরিপূর্ণ বিডের জন্য যে মাত্রা ব্যবহার করা উচিত তা নির্দিষ্ট করতে ব্যবহার করা যেতে পারে। সার্চ নেটওয়ার্কে বিজ্ঞাপন সর্বদা কীওয়ার্ড বিড ব্যবহার করে।

আপনি একটি বিড সামঞ্জস্যও সেট করতে পারেন যখন মাপদণ্ডটি একটি পরম বিডিং মাত্রায় না থাকে। বিজ্ঞাপন গোষ্ঠীর মানদণ্ডের bid_modifier ক্ষেত্র ব্যবহার করে এটি অ্যাক্সেস করা যেতে পারে।