পোর্টফোলিও এবং স্ট্যান্ডার্ড বিডিং কৌশল

পোর্টফোলিও বিডিং কৌশলগুলি স্বয়ংক্রিয়, লক্ষ্য-চালিত বিডিং কৌশল যা একাধিক প্রচারাভিযানের মধ্যে ভাগ করা যায়, যেখানে স্ট্যান্ডার্ড বিডিং কৌশলগুলি ভাগ করা হয় না এবং শুধুমাত্র একটি একক প্রচারাভিযানের দ্বারা ব্যবহার করা যেতে পারে। API উভয় ধরনের কৌশল তৈরি করতে সমর্থন করে। পোর্টফোলিও বিডিং কৌশলগুলি একটি অ্যাকাউন্টে স্বতন্ত্র বস্তু হিসাবে তৈরি করা হয়, যেখানে আদর্শ কৌশলগুলি একটি প্রচারে উপযুক্ত ক্ষেত্র সেট করে পরিচালিত হয়।

পোর্টফোলিও বিডিং কৌশল

আপনার প্রচারাভিযানের সাথে একটি পোর্টফোলিও বিডিং কৌশল ব্যবহার করতে, আপনার কাছে দুটি বিকল্প রয়েছে:

  1. একটি বিদ্যমান BiddingStrategy ব্যবহার করুন।
  2. ক্ষেত্রের name এবং scheme সেট সহ একটি নতুন তৈরি করতে MutateBiddingStrategies ব্যবহার করুন। একটি উদাহরণ হিসাবে, একটি TARGET_SPEND বিডিং কৌশলের জন্য, TargetSpend হিসাবে টাইপ করা একটি নতুন বস্তুর সাথে ক্ষেত্র target_spend সেট করুন।

একবার আপনি একটি BiddingStrategy বেছে নিলে, প্রচারাভিযানের bidding_strategy ক্ষেত্রটিকে এর resource_name এ সেট করে এটি ব্যবহার করার জন্য আপনার প্রচারাভিযান কনফিগার করুন।

নিম্নলিখিত উদাহরণটি দেখায় কিভাবে একটি নতুন প্রচারের জন্য একটি নতুন পোর্টফোলিও TARGET_SPEND বিডিং কৌশল তৈরি করতে হয়৷

জাভা

private String createBiddingStrategy(GoogleAdsClient googleAdsClient, long customerId) {
  try (BiddingStrategyServiceClient biddingStrategyServiceClient =
      googleAdsClient.getLatestVersion().createBiddingStrategyServiceClient()) {
    // Creates a portfolio bidding strategy.
    TargetSpend targetSpend = TargetSpend.newBuilder().setCpcBidCeilingMicros(2_000_000L).build();
    BiddingStrategy portfolioBiddingStrategy =
        BiddingStrategy.newBuilder()
            .setName("Maximize Clicks #" + getPrintableDateTime())
            .setTargetSpend(targetSpend)
            .build();
    // Constructs an operation that will create a portfolio bidding strategy.
    BiddingStrategyOperation operation =
        BiddingStrategyOperation.newBuilder().setCreate(portfolioBiddingStrategy).build();
    // Sends the operation in a mutate request.
    MutateBiddingStrategiesResponse response =
        biddingStrategyServiceClient.mutateBiddingStrategies(
            Long.toString(customerId), Lists.newArrayList(operation));

    MutateBiddingStrategyResult mutateBiddingStrategyResult = response.getResults(0);
    // Prints the resource name of the created object.
    System.out.printf(
        "Created portfolio bidding strategy with resource name: '%s'.%n",
        mutateBiddingStrategyResult.getResourceName());

    return mutateBiddingStrategyResult.getResourceName();
  }
}
      

সি#

private string CreatePortfolioBiddingStrategy(GoogleAdsClient client,
    long customerId, string name, long bidCeiling)
{
    // Get the BiddingStrategyService.
    BiddingStrategyServiceClient biddingStrategyService = client.GetService(
        Services.V17.BiddingStrategyService);

    // Create a portfolio bidding strategy.
    BiddingStrategy biddingStrategy = new BiddingStrategy()
    {
        Name = name,

        TargetSpend = new TargetSpend()
        {
            CpcBidCeilingMicros = bidCeiling,
        }
    };

    // Create operation.
    BiddingStrategyOperation biddingOperation = new BiddingStrategyOperation()
    {
        Create = biddingStrategy
    };

    // Create the portfolio bidding strategy.
    MutateBiddingStrategiesResponse biddingResponse =
        biddingStrategyService.MutateBiddingStrategies(
            customerId.ToString(), new BiddingStrategyOperation[] { biddingOperation });

    return biddingResponse.Results[0].ResourceName;
}
      

পিএইচপি

private static function createBiddingStrategy(GoogleAdsClient $googleAdsClient, int $customerId)
{
    // Creates a portfolio bidding strategy.
    $portfolioBiddingStrategy = new BiddingStrategy([
        'name' => 'Maximize Clicks #' . Helper::getPrintableDatetime(),
        'target_spend' => new TargetSpend([
            'cpc_bid_ceiling_micros' => 2000000
        ])
    ]);

    // Constructs an operation that will create a portfolio bidding strategy.
    $biddingStrategyOperation = new BiddingStrategyOperation();
    $biddingStrategyOperation->setCreate($portfolioBiddingStrategy);

    // Issues a mutate request to create the bidding strategy.
    $biddingStrategyServiceClient = $googleAdsClient->getBiddingStrategyServiceClient();
    $response = $biddingStrategyServiceClient->mutateBiddingStrategies(
        MutateBiddingStrategiesRequest::build($customerId, [$biddingStrategyOperation])
    );
    /** @var BiddingStrategy $addedBiddingStrategy */
    $addedBiddingStrategy = $response->getResults()[0];

    // Prints out the resource name of the created bidding strategy.
    printf(
        "Created portfolio bidding strategy with resource name: '%s'.%s",
        $addedBiddingStrategy->getResourceName(),
        PHP_EOL
    );

    return $addedBiddingStrategy->getResourceName();
}
      

পাইথন

# Create a portfolio bidding strategy.
bidding_strategy_operation = client.get_type("BiddingStrategyOperation")
bidding_strategy = bidding_strategy_operation.create
bidding_strategy.name = f"Enhanced CPC {uuid.uuid4()}"
target_spend = bidding_strategy.target_spend
target_spend.cpc_bid_ceiling_micros = 2000000

# Add portfolio bidding strategy.
try:
    bidding_strategy_response = (
        bidding_strategy_service.mutate_bidding_strategies(
            customer_id=customer_id, operations=[bidding_strategy_operation]
        )
    )
    bidding_strategy_id = bidding_strategy_response.results[0].resource_name
    print(f'Created portfolio bidding strategy "{bidding_strategy_id}".')
except GoogleAdsException as ex:
    handle_googleads_exception(ex)
      

রুবি

# Create a portfolio bidding strategy.
bidding_strategy = client.resource.bidding_strategy do |bs|
  bs.name = "Enhanced CPC ##{(Time.new.to_f * 1000).to_i}"
  bs.target_spend = client.resource.target_spend do |ts|
    ts.cpc_bid_ceiling_micros = 2_000_000
  end
end

operation = client.operation.create_resource.bidding_strategy(bidding_strategy)

response = client.service.bidding_strategy.mutate_bidding_strategies(
  customer_id: customer_id,
  operations: [operation],
)
bidding_id = response.results.first.resource_name

puts "Portfolio bidding strategy #{bidding_id} was created"
      

পার্ল

sub create_bidding_strategy {
  my ($api_client, $customer_id) = @_;

  # Create a portfolio bidding strategy.
  my $portfolio_bidding_strategy =
    Google::Ads::GoogleAds::V17::Resources::BiddingStrategy->new({
      name        => "Maximize Clicks #" . uniqid(),
      targetSpend => Google::Ads::GoogleAds::V17::Common::TargetSpend->new({
          cpcBidCeilingMicros => 2000000
        }
      ),
    });

  # Create a bidding strategy operation.
  my $bidding_strategy_operation =
    Google::Ads::GoogleAds::V17::Services::BiddingStrategyService::BiddingStrategyOperation
    ->new({
      create => $portfolio_bidding_strategy
    });

  # Add the bidding strategy.
  my $bidding_strategies_response =
    $api_client->BiddingStrategyService()->mutate({
      customerId => $customer_id,
      operations => [$bidding_strategy_operation]});

  my $bidding_strategy_resource_name =
    $bidding_strategies_response->{results}[0]{resourceName};

  printf "Created portfolio bidding strategy with resource name: '%s'.\n",
    $bidding_strategy_resource_name;

  return $bidding_strategy_resource_name;
}
      

জাভা

Campaign campaign =
    Campaign.newBuilder()
        .setName("Interplanetary Cruise #" + getPrintableDateTime())
        .setStatus(CampaignStatus.PAUSED)
        .setCampaignBudget(campaignBudgetResourceName)
        .setBiddingStrategy(biddingStrategyResourceName)
        .setAdvertisingChannelType(AdvertisingChannelType.SEARCH)
        .setNetworkSettings(networkSettings)
        .build();
      

সি#

// Create the campaign.
Campaign campaign = new Campaign()
{
    Name = name,
    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 campaign budget.
    CampaignBudget = campaignBudgetResourceName,

    // Set bidding strategy (required).
    BiddingStrategy = biddingStrategyResourceName,

    // Set the campaign network options.
    NetworkSettings = new NetworkSettings()
    {
        TargetGoogleSearch = true,
        TargetSearchNetwork = true,
        TargetContentNetwork = true,
        TargetPartnerSearchNetwork = false
    }
};
      

পিএইচপি

// Creates a Search campaign.
$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,
    // Configures the campaign network options.
    'network_settings' => new NetworkSettings([
        'target_google_search' => true,
        'target_search_network' => true,
        'target_content_network' => true,
    ]),
    // Sets the bidding strategy and budget.
    'bidding_strategy' => $biddingStrategyResourceName,
    'campaign_budget' => $campaignBudgetResourceName
]);
      

পাইথন

# Create campaign.
campaign_operation = client.get_type("CampaignOperation")
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.bidding_strategy = bidding_strategy_id
campaign.manual_cpc.enhanced_cpc_enabled = True
campaign.campaign_budget = campaign_budget_id

# Set the campaign network options.
campaign.network_settings.target_google_search = True
campaign.network_settings.target_search_network = True
campaign.network_settings.target_content_network = False
campaign.network_settings.target_partner_search_network = False
      

রুবি

# Create campaigns.
campaigns = 2.times.map do |i|
  client.resource.campaign do |c|
    c.name = "Interplanetary Cruise ##{(Time.new.to_f * 1000).to_i + i}"
    c.status = :PAUSED
    c.bidding_strategy = bidding_id
    c.campaign_budget = budget_id
    c.advertising_channel_type = :SEARCH
    c.network_settings = client.resource.network_settings do |ns|
      ns.target_google_search = true
      ns.target_search_network = true
      ns.target_content_network = false
      ns.target_partner_search_network = false
    end
  end
end
      

পার্ল

# Create a search campaign.
my $campaign = Google::Ads::GoogleAds::V17::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,
    # Configures the campaign network options.
    networkSettings =>
      Google::Ads::GoogleAds::V17::Resources::NetworkSettings->new({
        targetGoogleSearch   => "true",
        targetSearchNetwork  => "true",
        targetContentNetwork => "true"
      }
      ),
    # Set the bidding strategy and budget.
    biddingStrategy => $bidding_strategy_resource_name,
    campaignBudget  => $campaign_budget_resource_name
  });
      

একটি বিদ্যমান পোর্টফোলিও বিডিং কৌশল একটি ভাগ করা বাজেটের সাথে লিঙ্ক করা যেতে পারে। একবার দুটি যুক্ত হয়ে গেলে, ভাগ করা বাজেট সবসময় সেই প্রচারাভিযানের সাথে যুক্ত থাকবে যা বিডিং কৌশলের অংশ।

আপনি শুধুমাত্র একটি পোর্টফোলিও বিডিং কৌশল এবং একটি বিদ্যমান শেয়ার্ড বাজেট একসাথে লিঙ্ক করতে পারেন—আপনি দুটির একটি তৈরি করতে পারবেন না এবং অবিলম্বে এটিকে অন্যটির সাথে সংযুক্ত করতে পারবেন।

একটি CampaignBudget সাথে একটি BiddingStrategy যুক্ত করতে, একটি MutateOperation পাঠান যা দুটি সত্তাকে আপডেট করে, বিডিং কৌশলে aligned_budget_id ক্ষেত্রটিকে ভাগ করা বাজেটের ID এবং aligned_bidding_strategy ক্ষেত্রটিকে প্রচারাভিযানের বাজেটে পোর্টফোলিও বিডিং কৌশলের আইডিতে সেট করে৷

স্ট্যান্ডার্ড বিডিং কৌশল

আপনার প্রচারাভিযানের সাথে একটি স্ট্যান্ডার্ড বিডিং কৌশল ব্যবহার করতে, এইভাবে প্রচারাভিযান সেট করুন:

  • campaign_bidding_strategy ইউনিয়ন ফিল্ড সেট করে ব্যবহার করা বিডিং স্কিমটি এম্বেড করুন। তাই একটি TARGET_CPA বিডিং কৌশলের জন্য, TargetCpa টাইপের একটি নতুন বিডিং স্কিম অবজেক্ট সহ ক্ষেত্র target_cpa সেট করুন)।
  • bidding_strategy ফিল্ড সেট করবেন না

এই উদাহরণটি দেখায় কিভাবে একটি নতুন প্রচারাভিযান তৈরি করার সময় একটি আদর্শ MAXIMIZE_CONVERSION_VALUE বিডিং কৌশল সেট করতে হয়:

জাভা

/** Creates a MutateOperation that creates a new Performance Max campaign. */
private MutateOperation createPerformanceMaxCampaignOperation(long customerId) {
  Campaign performanceMaxCampaign =
      Campaign.newBuilder()
          .setName("Performance Max campaign #" + getPrintableDateTime())
          // Sets the campaign status as PAUSED. The campaign is the only entity in
          // the mutate request that should have its status set.
          .setStatus(CampaignStatus.PAUSED)
          // All Performance Max campaigns have an advertising_channel_type of
          // PERFORMANCE_MAX. The advertising_channel_sub_type should not be set.
          .setAdvertisingChannelType(AdvertisingChannelType.PERFORMANCE_MAX)
          // Bidding strategy must be set directly on the campaign.
          // Setting a portfolio bidding strategy by resource name is not supported.
          // Max Conversion and Maximize Conversion Value are the only strategies
          // supported for Performance Max campaigns.
          // An optional ROAS (Return on Advertising Spend) can be set for
          // maximize_conversion_value. The ROAS value must be specified as a ratio in
          // the API. It is calculated by dividing "total value" by "total spend".
          // For more information on Maximize Conversion Value, see the support
          // article: http://support.google.com/google-ads/answer/7684216.
          // A targetRoas of 3.5 corresponds to a 350% return on ad spend.
          .setMaximizeConversionValue(
              MaximizeConversionValue.newBuilder().setTargetRoas(3.5).build())
          // Sets the Final URL expansion opt out. This flag is specific to
          // Performance Max campaigns. If opted out (True), only the final URLs in
          // the asset group or URLs specified in the advertiser's Google Merchant
          // Center or business data feeds are targeted.
          // If opted in (False), the entire domain will be targeted. For best
          // results, set this value to false to opt in and allow URL expansions. You
          // can optionally add exclusions to limit traffic to parts of your website.
          .setUrlExpansionOptOut(false)
          // Assigns the resource name with a temporary ID.
          .setResourceName(
              ResourceNames.campaign(customerId, PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID))
          // Sets the budget using the given budget resource name.
          .setCampaignBudget(ResourceNames.campaignBudget(customerId, BUDGET_TEMPORARY_ID))
          // Optional fields.
          .setStartDate(new DateTime().plusDays(1).toString("yyyyMMdd"))
          .setEndDate(new DateTime().plusDays(365).toString("yyyyMMdd"))
          .build();

  return MutateOperation.newBuilder()
      .setCampaignOperation(
          CampaignOperation.newBuilder().setCreate(performanceMaxCampaign).build())
      .build();
}
      

সি#

/// Creates a MutateOperation that creates a new Performance Max campaign.
/// <param name="campaignResourceName">The campaign resource name.</param>
/// <param name="campaignBudgetResourceName">The campaign budget resource name.</param>
/// <returns>A MutateOperations that will create this new campaign.</returns>
private MutateOperation CreatePerformanceMaxCampaignOperation(
    string campaignResourceName,
    string campaignBudgetResourceName)
{
    MutateOperation operation = new MutateOperation()
    {
        CampaignOperation = new CampaignOperation()
        {
            Create = new Campaign()
            {
                Name = "Performance Max campaign #" + ExampleUtilities.GetRandomString(),

                // Set the campaign status as PAUSED. The campaign is the only entity in
                // the mutate request that should have its status set.
                Status = CampaignStatus.Paused,

                // All Performance Max campaigns have an AdvertisingChannelType of
                // PerformanceMax. The AdvertisingChannelSubType should not be set.
                AdvertisingChannelType = AdvertisingChannelType.PerformanceMax,

                // Bidding strategy must be set directly on the campaign. Setting a
                // portfolio bidding strategy by resource name is not supported. Max
                // Conversion and Maximize Conversion Value are the only strategies
                // supported for Performance Max campaigns. BiddingStrategyType is
                // read-only and cannot be set by the API. An optional ROAS (Return on
                // Advertising Spend) can be set to enable the MaximizeConversionValue
                // bidding strategy. The ROAS value must be specified as a ratio in the API.
                // It is calculated by dividing "total value" by "total spend".
                //
                // For more information on Maximize Conversion Value, see the support
                // article:
                // http://support.google.com/google-ads/answer/7684216.
                //
                // A target_roas of 3.5 corresponds to a 350% return on ad spend.
                MaximizeConversionValue = new MaximizeConversionValue()
                {
                    TargetRoas = 3.5
                },

                // Set the Final URL expansion opt out. This flag is specific to
                // Performance Max campaigns. If opted out (True), only the final URLs in
                // the asset group or URLs specified in the advertiser's Google Merchant
                // Center or business data feeds are targeted.
                // If opted in (False), the entire domain will be targeted. For best
                // results, set this value to false to opt in and allow URL expansions. You
                // can optionally add exclusions to limit traffic to parts of your website.
                UrlExpansionOptOut = false,

                // Use the temporary resource name created earlier
                ResourceName = campaignResourceName,

                // Set the budget using the given budget resource name.
                CampaignBudget = campaignBudgetResourceName,

                // Optional fields
                StartDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd"),
                EndDate = DateTime.Now.AddDays(365).ToString("yyyyMMdd")
            }
        }
    };

    return operation;
}

      

পিএইচপি

private static function createPerformanceMaxCampaignOperation(int $customerId): MutateOperation
{
    // Creates a mutate operation that creates a campaign operation.
    return new MutateOperation([
        'campaign_operation' => new CampaignOperation([
            'create' => new Campaign([
                'name' => 'Performance Max campaign #' . Helper::getPrintableDatetime(),
                // Assigns the resource name with a temporary ID.
                'resource_name' => ResourceNames::forCampaign(
                    $customerId,
                    self::PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
                ),
                // Sets the budget using the given budget resource name.
                'campaign_budget' => ResourceNames::forCampaignBudget(
                    $customerId,
                    self::BUDGET_TEMPORARY_ID
                ),
                // The campaign is the only entity in the mutate request that should have its
                // status set.
                // Recommendation: Set the campaign to PAUSED when creating it to prevent
                // the ads from immediately serving.
                'status' => CampaignStatus::PAUSED,
                // All Performance Max campaigns have an advertising_channel_type of
                // PERFORMANCE_MAX. The advertising_channel_sub_type should not be set.
                'advertising_channel_type' => AdvertisingChannelType::PERFORMANCE_MAX,

                // Bidding strategy must be set directly on the campaign.
                // Setting a portfolio bidding strategy by resource name is not supported.
                // Max Conversion and Maximize Conversion Value are the only strategies
                // supported for Performance Max campaigns.
                // An optional ROAS (Return on Advertising Spend) can be set for
                // maximize_conversion_value. The ROAS value must be specified as a ratio in
                // the API. It is calculated by dividing "total value" by "total spend".
                // For more information on Maximize Conversion Value, see the support
                // article: http://support.google.com/google-ads/answer/7684216.
                // A target_roas of 3.5 corresponds to a 350% return on ad spend.
                'maximize_conversion_value' => new MaximizeConversionValue([
                    'target_roas' => 3.5
                ]),

                // Sets the Final URL expansion opt out. This flag is specific to
                // Performance Max campaigns. If opted out (true), only the final URLs in
                // the asset group or URLs specified in the advertiser's Google Merchant
                // Center or business data feeds are targeted.
                // If opted in (false), the entire domain will be targeted. For best
                // results, set this value to false to opt in and allow URL expansions. You
                // can optionally add exclusions to limit traffic to parts of your website.
                'url_expansion_opt_out' => false,

                // Optional fields.
                'start_date' => date('Ymd', strtotime('+1 day')),
                'end_date' => date('Ymd', strtotime('+365 days'))
            ])
        ])
    ]);
}
      

পাইথন

def create_performance_max_campaign_operation(
    client,
    customer_id,
):
    """Creates a MutateOperation that creates a new Performance Max campaign.

    A temporary ID will be assigned to this campaign 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.

    Returns:
        a MutateOperation that creates a campaign.
    """
    mutate_operation = client.get_type("MutateOperation")
    campaign = mutate_operation.campaign_operation.create
    campaign.name = f"Performance Max campaign #{uuid4()}"
    # Set the campaign status as PAUSED. The campaign is the only entity in
    # the mutate request that should have its status set.
    campaign.status = client.enums.CampaignStatusEnum.PAUSED
    # All Performance Max campaigns have an advertising_channel_type of
    # PERFORMANCE_MAX. The advertising_channel_sub_type should not be set.
    campaign.advertising_channel_type = (
        client.enums.AdvertisingChannelTypeEnum.PERFORMANCE_MAX
    )
    # Bidding strategy must be set directly on the campaign.
    # Setting a portfolio bidding strategy by resource name is not supported.
    # Max Conversion and Maximize Conversion Value are the only strategies
    # supported for Performance Max campaigns.
    # An optional ROAS (Return on Advertising Spend) can be set for
    # maximize_conversion_value. The ROAS value must be specified as a ratio in
    # the API. It is calculated by dividing "total value" by "total spend".
    # For more information on Maximize Conversion Value, see the support
    # article: http://support.google.com/google-ads/answer/7684216.
    # A target_roas of 3.5 corresponds to a 350% return on ad spend.
    campaign.bidding_strategy_type = (
        client.enums.BiddingStrategyTypeEnum.MAXIMIZE_CONVERSION_VALUE
    )
    campaign.maximize_conversion_value.target_roas = 3.5

    # Set the Final URL expansion opt out. This flag is specific to
    # Performance Max campaigns. If opted out (True), only the final URLs in
    # the asset group or URLs specified in the advertiser's Google Merchant
    # Center or business data feeds are targeted.
    # If opted in (False), the entire domain will be targeted. For best
    # results, set this value to false to opt in and allow URL expansions. You
    # can optionally add exclusions to limit traffic to parts of your website.
    campaign.url_expansion_opt_out = False

    # Assign the resource name with a temporary ID.
    campaign_service = client.get_service("CampaignService")
    campaign.resource_name = campaign_service.campaign_path(
        customer_id, _PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
    )
    # Set the budget using the given budget resource name.
    campaign.campaign_budget = campaign_service.campaign_budget_path(
        customer_id, _BUDGET_TEMPORARY_ID
    )

    # Optional fields
    campaign.start_date = (datetime.now() + timedelta(1)).strftime("%Y%m%d")
    campaign.end_date = (datetime.now() + timedelta(365)).strftime("%Y%m%d")

    return mutate_operation
      

রুবি

# Creates a MutateOperation that creates a new Performance Max campaign.
#
# A temporary ID will be assigned to this campaign so that it can
# be referenced by other objects being created in the same Mutate request.
def create_performance_max_campaign_operation(client, customer_id)
  client.operation.mutate do |m|
    m.campaign_operation = client.operation.create_resource.campaign do |c|
      c.name = "Performance Max campaign #{SecureRandom.uuid}"
      # Set the campaign status as PAUSED. The campaign is the only entity in
      # the mutate request that should have its status set.
      c.status = :PAUSED
      # All Performance Max campaigns have an advertising_channel_type of
      # PERFORMANCE_MAX. The advertising_channel_sub_type should not be set.
      c.advertising_channel_type = :PERFORMANCE_MAX
      # Bidding strategy must be set directly on the campaign.
      # Setting a portfolio bidding strategy by resource name is not supported.
      # Max Conversion and Maximize Conversion Value are the only strategies
      # supported for Performance Max campaigns.
      # An optional ROAS (Return on Advertising Spend) can be set for
      # maximize_conversion_value. The ROAS value must be specified as a ratio in
      # the API. It is calculated by dividing "total value" by "total spend".
      # For more information on Maximize Conversion Value, see the support
      # article: http://support.google.com/google-ads/answer/7684216.
      # A target_roas of 3.5 corresponds to a 350% return on ad spend.
      c.bidding_strategy_type = :MAXIMIZE_CONVERSION_VALUE
      c.maximize_conversion_value = client.resource.maximize_conversion_value do |mcv|
        mcv.target_roas = 3.5
      end
      # Set the Final URL expansion opt out. This flag is specific to
      # Performance Max campaigns. If opted out (true), only the final URLs in
      # the asset group or URLs specified in the advertiser's Google Merchant
      # Center or business data feeds are targeted.
      # If opted in (false), the entire domain will be targeted. For best
      # results, set this value to false to opt in and allow URL expansions. You
      # can optionally add exclusions to limit traffic to parts of your website.
      c.url_expansion_opt_out = false

      # Assign the resource name with a temporary ID.
      c.resource_name = client.path.campaign(customer_id, PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID)
      # Set the budget using the given budget resource name.
      c.campaign_budget = client.path.campaign_budget(customer_id, BUDGET_TEMPORARY_ID)

      # Optional fields
      c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')
      c.end_date = DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')
    end
  end
end
      

পার্ল

sub create_performance_max_campaign_operation {
  my ($customer_id) = @_;

  # Create a mutate operation that creates a campaign operation.
  return
    Google::Ads::GoogleAds::V17::Services::GoogleAdsService::MutateOperation->
    new({
      campaignOperation =>
        Google::Ads::GoogleAds::V17::Services::CampaignService::CampaignOperation
        ->new({
          create => Google::Ads::GoogleAds::V17::Resources::Campaign->new({
              # Assign the resource name with a temporary ID.
              resourceName =>
                Google::Ads::GoogleAds::V17::Utils::ResourceNames::campaign(
                $customer_id, PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
                ),
              name => "Performance Max campaign #" . uniqid(),
              # Set the budget using the given budget resource name.
              campaignBudget =>
                Google::Ads::GoogleAds::V17::Utils::ResourceNames::campaign_budget(
                $customer_id, BUDGET_TEMPORARY_ID
                ),
              # Set the campaign status as PAUSED. The campaign is the only entity in
              # the mutate request that should have its status set.
              status =>
                Google::Ads::GoogleAds::V17::Enums::CampaignStatusEnum::PAUSED,
              # All Performance Max campaigns have an advertisingChannelType of
              # PERFORMANCE_MAX. The advertisingChannelSubType should not be set.
              advertisingChannelType => PERFORMANCE_MAX,

              # Bidding strategy must be set directly on the campaign.
              # Setting a portfolio bidding strategy by resource name is not supported.
              # Max Conversion and Maximize Conversion Value are the only strategies
              # supported for Performance Max campaigns.
              # An optional ROAS (Return on Advertising Spend) can be set for
              # maximizeConversionValue. The ROAS value must be specified as a ratio in
              # the API. It is calculated by dividing "total value" by "total spend".
              # For more information on Maximize Conversion Value, see the support
              # article: http://support.google.com/google-ads/answer/7684216.
              # A targetRoas of 3.5 corresponds to a 350% return on ad spend.
              maximizeConversionValue =>
                Google::Ads::GoogleAds::V17::Common::MaximizeConversionValue->
                new({
                  targetRoas => 3.5
                }
                ),

              # Set the final URL expansion opt out. This flag is specific to
              # Performance Max campaigns. If opted out (true), only the final URLs in
              # the asset group or URLs specified in the advertiser's Google Merchant
              # Center or business data feeds are targeted.
              # If opted in (false), the entire domain will be targeted. For best
              # results, set this value to false to opt in and allow URL expansions. You
              # can optionally add exclusions to limit traffic to parts of your website.
              urlExpansionOptOut => "false",

              # Optional fields.
              startDate => strftime("%Y%m%d", localtime(time + 60 * 60 * 24)),
              endDate   =>
                strftime("%Y%m%d", localtime(time + 60 * 60 * 24 * 365)),
            })})});
}
      

বিডিং কৌশল পরিবর্তন

একটি প্রচারাভিযানের বিডিং কৌশল আপডেট করতে, একটি CampaignOperation.update এ, পূর্বে বর্ণিত হিসাবে Campaign ক্ষেত্রগুলি সেট করুন৷