Opteo/google-ads-node

Update Bidding Strategy for Campaign

bilalakbar opened this issue · 1 comments

I'm submitting a ...

  • bug report
  • feature request
  • question about the decisions made in the repository
  • question about how to use this project

This is the code that I am using to create a Campaign

// assuming all required properties
const campaign = {};
campaign.target_spend = {
    cpc_bid_ceiling_micros: 1000000
};

const response = await customer.campaigns.create(campaign);

It creates the campaign and in response I do have a campaign whose bidding strategy is target_spend

{
  "resource_name": "customers/9999999999/campaigns/1111111111",
  "bidding_strategy_type": 9,
  "id": 9999999999,
  "name": "Campaign Name",
  "status": 3
} 

Now, I want to change this bidding strategy to Maximize Conversions. As per API Docs, I just have to specify maximize_conversions property of type MaximizeConversions.

But MaximizeConversions type has no property. I am not sure what value I have to set it in update object.

I have tried it like below, that did not work.

const campaign = {
     "resource_name": "customers/9999999999/campaigns/1111111111",
    "maximize_conversions": ""
};
const response = await customer.campaigns.update(campaign);

How to set the maximize_conversions property in update object ?

See my reply over at google-ads-api 👉 Opteo/google-ads-api#176 (comment)