প্রচারাভিযান বাজেট বরাদ্দ

আপনি একটি প্রচারাভিযানে একটি বাজেট বরাদ্দ করতে পারেন, একটি প্রচারাভিযান থেকে একটি বাজেট বিচ্ছিন্ন করতে পারেন, বা একটি নির্দিষ্ট বাজেটে বরাদ্দ করা প্রচারাভিযানগুলি পুনরুদ্ধার করতে পারেন৷

একটি প্রচারণার জন্য একটি বাজেট বরাদ্দ করুন

আপনি CampaignBudgetService সাথে একটি CampaignBudget তৈরি করার পরে বা একটি বিদ্যমান একটি চিহ্নিত করার পরে, আপনাকে অবশ্যই এর resource_name ফিল্ডের মানটি CampaignService এ পরবর্তী কলে ব্যবহার করতে হবে। যদি বাজেট তৈরির কার্যক্রম সফল হয়, কিন্তু প্রচারাভিযানের কার্যভার ব্যর্থ হয়, তাহলে আপনার কাছে একটি অনাথ বাজেট থাকবে (একটি বাজেট যা কোনো প্রচারণার সাথে যুক্ত নয়)। আমরা আপনাকে এই জাতীয় বাজেটগুলি পুনরায় ব্যবহার বা সরানোর পরামর্শ দিই৷

নতুন প্রচারণা

একটি নতুন ক্যাম্পেইনের জন্য, CampaignOperation.create এ, Campaign অবজেক্টের campaign_budget ফিল্ডকে বাজেট রিসোর্সের নামে সেট করুন, যেমনটি নিচের কোড উদাহরণে দেখানো হয়েছে।

জাভা

// Creates the campaign.
Campaign campaign =
    Campaign.newBuilder()
        .setName("Interplanetary Cruise #" + getPrintableDateTime())
        .setAdvertisingChannelType(AdvertisingChannelType.SEARCH)
        // Recommendation: Set the campaign to PAUSED when creating it to prevent
        // the ads from immediately serving. Set to ENABLED once you've added
        // targeting and the ads are ready to serve
        .setStatus(CampaignStatus.PAUSED)
        // Sets the bidding strategy and budget.
        .setManualCpc(ManualCpc.newBuilder().build())
        .setCampaignBudget(budgetResourceName)
        // Adds the networkSettings configured above.
        .setNetworkSettings(networkSettings)
        // Declares whether this campaign serves political ads targeting the EU.
        .setContainsEuPoliticalAdvertising(DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING)
        // Optional: Sets the start & end dates.
        .setStartDate(new DateTime().plusDays(1).toString("yyyyMMdd"))
        .setEndDate(new DateTime().plusDays(30).toString("yyyyMMdd"))
        .build();
      

সি#

// Create the campaign.
Campaign campaign = new Campaign()
{
    Name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(),
    AdvertisingChannelType = AdvertisingChannelType.Search,

    // Recommendation: Set the campaign to PAUSED when creating it to prevent
    // the ads from immediately serving. Set to ENABLED once you've added
    // targeting and the ads are ready to serve
    Status = CampaignStatus.Paused,

    // Set the bidding strategy and budget.
    ManualCpc = new ManualCpc(),
    CampaignBudget = budget,

    // Set the campaign network options.
    NetworkSettings = new NetworkSettings
    {
        TargetGoogleSearch = true,
        TargetSearchNetwork = true,
        // Enable Display Expansion on Search campaigns. See
        // https://support.google.com/google-ads/answer/7193800 to learn more.
        TargetContentNetwork = true,
        TargetPartnerSearchNetwork = false
    },

    // Declare whether or not this campaign contains political ads targeting the EU.
    ContainsEuPoliticalAdvertising = EuPoliticalAdvertisingStatus.DoesNotContainEuPoliticalAdvertising,

    // Optional: Set the start date.
    StartDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd"),

    // Optional: Set the end date.
    EndDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd"),
};
      

পিএইচপি

$campaign = new Campaign([
    'name' => 'Interplanetary Cruise #' . Helper::getPrintableDatetime(),
    'advertising_channel_type' => AdvertisingChannelType::SEARCH,
    // Recommendation: Set the campaign to PAUSED when creating it to prevent
    // the ads from immediately serving. Set to ENABLED once you've added
    // targeting and the ads are ready to serve.
    'status' => CampaignStatus::PAUSED,
    // Sets the bidding strategy and budget.
    'manual_cpc' => new ManualCpc(),
    'campaign_budget' => $budgetResourceName,
    // Adds the network settings configured above.
    'network_settings' => $networkSettings,
    // Declare whether or not this campaign serves political ads targeting the EU.
    'contains_eu_political_advertising' =>
        EuPoliticalAdvertisingStatus::DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
    // Optional: Sets the start and end dates.
    'start_date' => date('Ymd', strtotime('+1 day')),
    'end_date' => date('Ymd', strtotime('+1 month'))
]);
      

পাইথন

# Create campaign.
campaign_operation: CampaignOperation = client.get_type("CampaignOperation")
campaign: Campaign = campaign_operation.create
campaign.name = f"Interplanetary Cruise {uuid.uuid4()}"
campaign.advertising_channel_type = (
    client.enums.AdvertisingChannelTypeEnum.SEARCH
)

# Recommendation: Set the campaign to PAUSED when creating it to prevent
# the ads from immediately serving. Set to ENABLED once you've added
# targeting and the ads are ready to serve.
campaign.status = client.enums.CampaignStatusEnum.PAUSED

# Set the bidding strategy and budget.
campaign.manual_cpc = client.get_type("ManualCpc")
campaign.campaign_budget = campaign_budget_response.results[0].resource_name

# Set the campaign network options.
campaign.network_settings.target_google_search = True
campaign.network_settings.target_search_network = True
campaign.network_settings.target_partner_search_network = False
# Enable Display Expansion on Search campaigns. For more details see:
# https://support.google.com/google-ads/answer/7193800
campaign.network_settings.target_content_network = True

# Declare whether or not this campaign serves political ads targeting the
# EU. Valid values are:
#   CONTAINS_EU_POLITICAL_ADVERTISING
#   DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
campaign.contains_eu_political_advertising = (
    client.enums.EuPoliticalAdvertisingStatusEnum.DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
)

# Optional: Set the start date.
start_time: datetime.date = datetime.date.today() + datetime.timedelta(
    days=1
)
campaign.start_date = datetime.date.strftime(start_time, _DATE_FORMAT)

# Optional: Set the end date.
end_time: datetime.date = start_time + datetime.timedelta(weeks=4)
campaign.end_date = datetime.date.strftime(end_time, _DATE_FORMAT)
      

রুবি

# Create campaign.
campaign = client.resource.campaign do |c|
  c.name = "Interplanetary Cruise #{(Time.new.to_f * 1000).to_i}"
  c.advertising_channel_type = :SEARCH

  # Recommendation: Set the campaign to PAUSED when creating it to prevent
  # the ads from immediately serving. Set to ENABLED once you've added
  # targeting and the ads are ready to serve.
  c.status = :PAUSED

  # Set the bidding strategy and budget.
  c.manual_cpc = client.resource.manual_cpc
  c.campaign_budget = return_budget.results.first.resource_name

  # Set the campaign network options.
  c.network_settings = client.resource.network_settings do |ns|
    ns.target_google_search = true
    ns.target_search_network = true
    # Enable Display Expansion on Search campaigns. See
    # https://support.google.com/google-ads/answer/7193800 to learn more.
    ns.target_content_network = true
    ns.target_partner_search_network = false
  end

  # Declare whether or not this campaign serves political ads targeting the EU.
  # Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
  # DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
  c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING

  # Optional: Set the start date.
  c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')

  # Optional: Set the end date.
  c.end_date = DateTime.parse((Date.today.next_year).to_s).strftime('%Y%m%d')
end
      

পার্ল

# Create a campaign.
my $campaign = Google::Ads::GoogleAds::V21::Resources::Campaign->new({
    name                   => "Interplanetary Cruise #" . uniqid(),
    advertisingChannelType => SEARCH,
    # Recommendation: Set the campaign to PAUSED when creating it to stop
    # the ads from immediately serving. Set to ENABLED once you've added
    # targeting and the ads are ready to serve.
    status => PAUSED,
    # Set the bidding strategy and budget.
    manualCpc      => Google::Ads::GoogleAds::V21::Common::ManualCpc->new(),
    campaignBudget => $campaign_budgets_response->{results}[0]{resourceName},
    # Set the campaign network options.
    networkSettings =>
      Google::Ads::GoogleAds::V21::Resources::NetworkSettings->new({
        targetGoogleSearch  => "true",
        targetSearchNetwork => "true",
        # Enable Display Expansion on Search campaigns. See
        # https://support.google.com/google-ads/answer/7193800 to learn more.
        targetContentNetwork       => "true",
        targetPartnerSearchNetwork => "false"
      }
      ),
    # Declare whether or not this campaign serves political ads targeting the EU.
    # Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
    # DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
    containsEuPoliticalAdvertising =>
      DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING,
    # Optional: Set the start date. The campaign starts tomorrow.
    startDate => strftime("%Y%m%d", localtime(time + 60 * 60 * 24)),
    # Optional: Set the end date. The campaign runs for 30 days.
    endDate => strftime("%Y%m%d", localtime(time + 60 * 60 * 24 * 30)),
  });
      

বিদ্যমান প্রচারণা

একটি বিদ্যমান প্রচারাভিযানের বাজেট প্রতিস্থাপন করতে, একটি CampaignOperation.updateCampaign campaign_budget ক্ষেত্রটিকে একটি বিদ্যমান বাজেটের সংস্থান নামের সাথে সেট করুন (আপনি সেট করতে চান এমন অন্য কোনো প্রচারাভিযানের ক্ষেত্রগুলির সাথে)। মনে রাখবেন যে এটি প্রচারাভিযানের জন্য বরাদ্দ করা বিদ্যমান বাজেটকে campaign_budget ক্ষেত্রের দ্বারা নির্দিষ্ট করা বাজেটের সাথে প্রতিস্থাপন করবে, যেহেতু একটি প্রচারাভিযান একবারে শুধুমাত্র একটি বাজেটের সাথে যুক্ত হতে পারে।

একটি প্রচারাভিযান থেকে একটি বাজেট বিচ্ছিন্ন করুন

একটি প্রচারাভিযান সবসময় একটি বাজেটের সাথে যুক্ত হতে হবে। আপনি প্রচারাভিযানের সাথে সম্পর্কিত বাজেট পরিবর্তন করে একটি প্রচারাভিযান থেকে একটি বাজেট অপসারণ করতে পারেন, যার ফলে এটি অন্য বাজেটের সাথে প্রতিস্থাপন করুন ৷ একটি নির্দিষ্ট বাজেট ব্যবহার করে প্রচারাভিযান সনাক্ত করতে, পরবর্তী বিভাগে চালিয়ে যান।

একটি বাজেট বরাদ্দ প্রচারাভিযান পুনরুদ্ধার করুন

একই বাজেট ব্যবহার করে এমন প্রচারাভিযানের তালিকা পাওয়া বাজেট ব্যবহারের ভারসাম্য বজায় রাখতে সহায়ক হতে পারে। নিম্নলিখিত GAQL কোয়েরি নির্দিষ্ট বাজেট আইডির জন্য সমস্ত প্রচারাভিযান ফিরিয়ে দেবে:

SELECT campaign.id
FROM campaign
WHERE campaign_budget.id = campaign_budget_id