GAQL - Ad assets disappear when a `segments` field is selected

2024-04-17 Thread Zhe Lin
Hi there,

I was using GAQL in SearchGoogleAdsStreamRequest, selecting from 
`ad_group_ad_asset_view`.

One issue was that, when the SELECTed fields and the WHERE clause contained 
a `segments` field , some ad assets disappear from the response.

Here are the queries I tried.

Query without segment fields which result in 1 row in the response
```
SELECT
ad_group_ad.ad.id,
asset.text_asset.text
   FROM ad_group_ad_asset_view
  WHERE ad_group_ad.ad.id = ""
AND asset.id = ""
```

Query with `segments.ad_network_type` which result in no row in the response
```
SELECT
ad_group_ad.ad.id,
asset.text_asset.text
, segments.ad_network_type
   FROM ad_group_ad_asset_view
  WHERE ad_group_ad.ad.id = ""
AND asset.id = ""
AND segments.ad_network_type = "SEARCH"
```

It only applied to specific ad asset. Please let me know how to properly 
include sensitive values like the IDs of the ad, ad asset, and the customer 
account to reproduce the issue.

Also, I was using Python. If necessary, I can share the Python code with 
you.

Looking forward to your response.

Regards,
Zhe

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2b19470a-d3f1-46dd-a2d6-e07730fc4332n%40googlegroups.com.


Re: How to download HTML5 ad assets

2023-11-21 Thread Zhe Lin
Hi there,

I have the same question.

Not about version upgrading, but about the asset.
So let 's say, in GoogleAds API v15,
if I have an asset resource name like 
"customers/(account_id)/assets/(asset_id)", how may I obtain the asset file 
(image or video) ?

Best regards,




On Thursday, December 2, 2021 at 5:58:42 PM UTC+9 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thanks for reaching out to us.
>
> Note that Google Ads API v8 was deprecated last November and will sunset 
> in April/May 2022. You may use the Google Ads API v9, and refer to this 
> *guide* 
>  
> for migrating from v8 to v9.
>
> For HTML5 ad, could you provide us with the complete *request* 
> 
>  
> and *response* 
> 
>  
> logs with the *request-id* 
> 
>  
> generated, so our team can better check?
>
> If you haven't yet, logging can be enabled by navigating to the Client 
> libraries > Your client library (ex. Python) > Logging documentation, which 
> you can access from this *link* 
> . You may 
> then send the requested information via the *Reply privately to author* 
> option. If this option is not available, you may send the details directly 
> to our googleadsa...@google.com alias instead.
>
> Regards, 
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2Ry5Tz:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2d67afd3-0d57-450a-951b-d91ae0babf8bn%40googlegroups.com.


Re: AdTypeEnum Values Documented in Google Ads API Not Appearing

2022-06-28 Thread Zhe Lin
Hi Matt,

On 3rd May you said "next week", wonder how is it now on 22th, June.
Would be great if let us know in which version of `googleads` that is fixed.

Here is my attempt. It doesn't seem `googleads==32.0.0` (newest up until 
now) has that.

```
$ pip install -U googleads
...
Successfully installed googleads-32.0.0

$ cat 
.venv/lib/python3.9/site-packages/google/ads/googleads/v10/enums/types/ad_type.py|grep
 
35

```

Besides that, I 'd question that, if it is a wise thing to use protobuf in 
the first place.
Back to the adwords API, everything was XML.
Which means, if you add a new type of ads, and give them in your response, 
in the client side,
we basically can figure out that and update our code rapidly.

However, with protobuf, it is not. Until you release a newer version of the 
`googleads` library
with the new ad structures, in the client side cannot even get the new ad 
in a normal way.

Here is a minimal example to explain that.
`pip install googleads==32.0.0` and create a <35 DISCOVERY_MULTI_ASSET_AD>
 in your AdWords account before run it.

```
def main(client, account_id, ad_id):
query = (
"SELECT"
" ad_group_ad.ad.discovery_multi_asset_ad.business_name"
" FROM ad_group_ad"
" WHERE ad_group_ad.ad.id = %s"
) % ad_id
print('Run query:', query)
customer_service = client.get_service("GoogleAdsService")
search_request = client.get_type("SearchGoogleAdsStreamRequest")
search_request.query = query
search_request.customer_id = account_id

stream = customer_service.search_stream(search_request)
for batch in stream:
for row in batch.results:
x = row.ad_group_ad.ad.discovery_multi_asset_ad
print(x)


if __name__ == '__main__':
main(
   GoogleAdsClient.load_from_dict() ,
  ,
  
  )
```

You would suffer

```
  File ".." in main
x = row.ad_group_ad.ad.discovery_multi_asset_ad
  File ".", in __getattr__
raise AttributeError(str(ex))
AttributeError: 'discovery_multi_asset_ad'
```

Wonder if I 'm doing wrong, and appreciate any hint to fix that.

Best regards,
Zhe




On Tuesday, May 3, 2022 at 1:38:20 AM UTC+9 adsapi wrote:

> Hi Elliot,
>
> Thanks for reaching out. Please see the client library forum post kindly 
> linked by Dorian. Discovery Campaign enums should be supported in the 
> client library within the next week.
>
> Regards,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2aOrY8:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/736f22e8-5810-47ad-b19f-71f1ac21eb76n%40googlegroups.com.


Re: Replacement for the removed `XxxConstantService`s when upgrading from v9 to v10 ?

2022-03-02 Thread Zhe Lin
Hi Peter,

Thanks for your reply!
I replaced all those service names with `GoogleAdsService` in my code and 
it works fine now.

Best regards,
Zhe


On Wednesday, March 2, 2022 at 11:32:00 AM UTC+9 adsapi wrote:

> Hi Zhe Lin,
>
> Thank you for reaching out to our API support team.
>
> As per this guide 
> <https://developers.google.com/google-ads/api/docs/version-migration#v9-v10>, 
> it states that :
>
> *get methods have been removed. Any service that exclusively had a get 
> method has been removed as well. The primary way to **retrieve objects* 
> <https://developers.google.com/google-ads/api/docs/concepts/retrieving-objects>
>  * 
> continues to be using GoogleAdsService's search and searchStream methods.*
>
> That being said, services such as the ones you listed which only contained 
> get methods were removed in the new version. You may now use the search and 
> searchStream methods (see also streaming 
> <https://developers.google.com/google-ads/api/docs/reporting/streaming> 
> guide) instead to retrieve details of your objects / resources. You may 
> then refer to the list here 
> <https://developers.google.com/google-ads/api/fields/v10/overview>, for 
> which resources or reports to generate.
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2XkFSA:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0f60dc06-fabd-4eec-91d8-26bc8e414417n%40googlegroups.com.


Replacement for the removed `XxxConstantService`s when upgrading from v9 to v10 ?

2022-02-28 Thread Zhe Lin
Good day, Google Ads API team

I 'm trying to upgrade from Google Ads API v9 to v10. I can see the 
following services are removed.

Services I'm using but missing in v10:
OperatingSystemVersionConstantService
MobileDeviceConstantService
MobileAppCategoryConstantService
UserInterestService
LanguageConstantService

However, I didn't find any instructions from the release notes. 
https://developers.google.com/google-ads/api/docs/release-notes#all_services

None of the above can be found when I tried to Ctrl+F the service name.

It would be very helpful if you can show me the replacement of them or any 
instructions to use them in v10.

Best regards,
Zhe Lin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/26ab63c7-fae7-4b9b-bf3d-a638497c319en%40googlegroups.com.


Re: Find the original asset when getting error: CANNOT_MODIFY_ASSET_NAME when uploading duplicate image

2022-02-09 Thread Zhe Lin
Hi there, just wonder if any progress you 've made here for this topic.

It's Feb 2022 and I'm still facing the same error.

As another developer mentioned above

> Typically when getting a duplicate error you really expect to have the Id 
or some reference that points you to the original resource, so it would be 
amazing to have that.

That 's really a great thought. So may I have the ID ( or `resource_name` ) 
in the error message ( so for it is just 'The asset has a name which is 
different from an existing duplicate that represents the same content' ) ?
Just change the error message. You don't have to take hours to write and 
publish a blog somewhere.
It would be very very helpful and nobody would reply to this thread and 
bother you again and again.

Would you consider do that ?



On Tuesday, November 30, 2021 at 6:01:19 AM UTC+9 adsapi wrote:

> Hi James,
>
> Thank you for reporting on how the hacky workaround works. You may monitor 
> our blog 
>  for 
> an update on this popular request.
>
>
> Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 
> 2021 
> Google Ads API and AdWords API Annual Survey 
> 
>  
> Regards, 
> [image: Google Logo] 
> Aryeh Baker 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2Hyur3:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/282631e6-b708-4028-8296-aaf0da50b275n%40googlegroups.com.


Got INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE when setting target CPA for search campaigns

2021-09-30 Thread Zhe Lin
Good day,

My team are using Google Ads API v8 and we have a set of unit test cases 
that run from time to time to check if we are using API in the right way.

>From today, we noticed a test case started failing. It is about setting the 
TARGET_CPA bidding strategy to a Search campaign ( which was created with 
MANUAL_CPC). The last time the case has passed was 2 days ago.
Wonder if any changes in the API in these 2 days and what actions I should 
take to make it work.

Request and response details and the code

*Request*

Method: /google.ads.googleads.v8.services.CampaignService/MutateCampaigns
Host: googleads.googleapis.com
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "PLEASE LET ME KNOW IF YOU NEED THIS INFORMATION",
  "x-goog-api-client": "gl-python/3.9.4 grpc/1.39.0 gax/1.31.2 
gapic/13.0.0",
  "x-goog-request-params": "customer_id=PLEASE LET ME KNOW IF YOU NEED THIS 
INFORMATION"
}
Request: customer_id: "PLEASE LET ME KNOW IF YOU NEED THIS INFORMATION"
operations {
  update {
resource_name: "customers/PLEASE LET ME KNOW IF YOU NEED THIS 
INFORMATION/campaigns/14825758506"
bidding_strategy_type: TARGET_CPA
target_cpa {
  target_cpa_micros: 1000
  cpc_bid_ceiling_micros: 1
  cpc_bid_floor_micros: 1000
}
  }
  update_mask {
paths: "resource_name"
paths: "bidding_strategy_type"
paths: "target_cpa.target_cpa_micros"
paths: "target_cpa.cpc_bid_ceiling_micros"
paths: "target_cpa.cpc_bid_floor_micros"
  }
}

*Response*
---
Headers: {
  "google.ads.googleads.v8.errors.googleadsfailure-bin": 
"\n\u0001\n\u0003\u0001\n\u0012ABidding strategy is not supported or cannot 
be used as 
anonymous.\u001a\f*\nTARGET_CPA\"(\u0012\u000e\n\noperations\u0018\u\u0012\b\n\u0006update\u0012\f\n\ntarget_cpa\u0012\u0016sHRSjMmPQ_THj4x-mcNZJw",
  "grpc-status-details-bin": "\b\u0003\u0012%Request contains an invalid 
argument.\u001a\u0001\nCtype.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure\u0012\u0001\n\u0001\n\u0003\u0001\n\u0012ABidding
 
strategy is not supported or cannot be used as 
anonymous.\u001a\f*\nTARGET_CPA\"(\u0012\u000e\n\noperations\u0018\u\u0012\b\n\u0006update\u0012\f\n\ntarget_cpa\u0012\u0016sHRSjMmPQ_THj4x-mcNZJw",
  "request-id": "sHRSjMmPQ_THj4x-mcNZJw"
}
Fault: errors {
  error_code {
bidding_error: INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE
  }
  message: "Bidding strategy is not supported or cannot be used as 
anonymous."
  trigger {
string_value: "TARGET_CPA"
  }
  location {
field_path_elements {
  field_name: "operations"
  index: 0
}
field_path_elements {
  field_name: "update"
}
field_path_elements {
  field_name: "target_cpa"
}
  }
}
request_id: "sHRSjMmPQ_THj4x-mcNZJw"

( Note since it is in our test case, the request was sent to the sandbox 
environment )

*Code*

import uuid
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.v8.enums.types.bidding_strategy_type import 
BiddingStrategyTypeEnum
from google.api_core import protobuf_helpers


def main(client, customer_id):
uid = uuid.uuid4()
campaign_budget_service = client.get_service("CampaignBudgetService")
campaign_service = client.get_service("CampaignService")

# Create a budget, which can be shared by multiple campaigns.
campaign_budget_operation = client.get_type("CampaignBudgetOperation")
campaign_budget = campaign_budget_operation.create
campaign_budget.name = f"Bidding strategy test campaign budget {uid}"
campaign_budget.delivery_method = (
client.enums.BudgetDeliveryMethodEnum.STANDARD
)
campaign_budget.amount_micros = 1000

campaign_budget_response = (
campaign_budget_service.mutate_campaign_budgets(
customer_id=customer_id, operations=[campaign_budget_operation]
)
)

# Create campaign.
campaign_operation = client.get_type("CampaignOperation")
campaign = campaign_operation.create
campaign.name = f"Bidding strategy test campaign {uid}"
campaign.advertising_channel_type = (
client.enums.AdvertisingChannelTypeEnum.SEARCH
)
campaign.bidding_strategy_type = (
BiddingStrategyTypeEnum.BiddingStrategyType.MANUAL_CPC
)

# 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.enhanced_cpc_enabled = True
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_content_network = False
campaign.network_settings.target_partner_search_network = 

Re: Can't update campaign bidding strategy.

2021-09-21 Thread Zhe Lin
Greetings,

I also came across the same issue, and wonder if there is any update about 
this.

I 'm using v8 and I 'm not able to set a DISPLAY campaign using 
MAXIMIZE_CONVERSIONS or MANUAL_CPM as its bidding strategy when UPDATE it.

Here is some more information and hope it helps.
* It is fine to CREATE display campaigns using those bidding strategies
* It is fine to update a SEARCH campaign using MAXIMIZE_CONVERSIONS as its 
bidding strategy with a `target_cpa` set to it.
  * However, it is not possible to update using MAXIMIZE_CONVERSIONS 
without setting the `target_cpa`. The API call completes without any error 
but the bidding strategy just won't be set to the campaign
* It is fine to update a display campaign using MAXIMIZE_CONVERSIONS 
strategy by the old AdWords API

Looking forward to your reply.



On Tuesday, March 9, 2021 at 10:32:08 AM UTC+9 Google Ads API Forum Advisor 
Prod wrote:

> Hi Dmitriy,
>
> Thank you for posting your concern.
>
> I would like to inform you that I will delete your initial post as it 
> contains the API logs. However, allow me to put the body of your post here.
>
> Upon checking the API logs and the *Change History* of your Google Ads 
> account, I can see that the bidding strategy is changed to 
> *MAXIMIZE_CONVERSIONS*, however, it is not reflected in the *Settings* 
> view of the said campaign. With this, to further investigate the issue, 
> could you provide the customer ID and complete request 
> 
>  and response 
> 
>  logs 
> with request ID 
> 
>  without 
> redacted fields? You can provide it via *Reply privately to author* 
> option.
>
> "
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Hi! I have problem with update 'search' campaign bidding strategy... This 
> example working fine (no errors in log)  campaign_operation = 
> client.get_type("CampaignOperation", version="v6") 
> bidding_strategy_type_enum = client.get_type("BiddingStrategyTypeEnum", 
> version="v6") target_impression_share_location_enum = 
> client.get_type("TargetImpressionShareLocationEnum", version="v6") campaign 
> = campaign_operation.update campaign.resource_name = 
> campaign_service.campaign_path(customer_id, campaign_id) 
> campaign.bidding_strategy_type = 
> bidding_strategy_type_enum.TARGET_IMPRESSION_SHARE 
> campaign.target_impression_share.location = 
> target_impression_share_location_enum.ABSOLUTE_TOP_OF_PAGE 
> campaign.target_impression_share.location_fraction_micros = 11 
> campaign.target_impression_share.cpc_bid_ceiling_micros = 60 fm = 
> protobuf_helpers.field_mask(None, campaign) 
> campaign_operation.update_mask.CopyFrom(fm)  But this second 
> example has no effect (no errors in log)  campaign_operation = 
> client.get_type("CampaignOperation", version="v6") 
> bidding_strategy_type_enum = client.get_type("BiddingStrategyTypeEnum", 
> version="v6") campaign = campaign_operation.update campaign.resource_name = 
> campaign_service.campaign_path(customer_id, campaign_id) 
> campaign.bidding_strategy_type = 
> bidding_strategy_type_enum.MAXIMIZE_CONVERSIONS fm = 
> protobuf_helpers.field_mask(None, campaign) 
> campaign_operation.update_mask.CopyFrom(fm)  Maybe need more 
> parameters for second example? Debug log is attached. Thank you in advance!*
> "
>
> Regards,
> [image: Google Logo] 
> Ernie John Blanca Tacata 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2DLmCa:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a526587e-fcbf-49c7-96bb-1ab0566e3684n%40googlegroups.com.


Reset a keyword's bid amounts

2019-01-07 Thread Zhe Lin
Hi there,

I'm trying to reset the `biddingStrategyConfiguration.bids` of a keyword 
(ad group biddable criterion) by API.

I think after I do that the `cpcBidSource` of the keyword should be reset 
from 'CRITERION' to 'ADGROUP'. (Please let me know if it's not true)

Since "BidSource" is a read only field I tried something else, like setting 
its 'biddingStrategyConfiguration.biddingStrategyType' to 'NONE',
as in the reference 

 
it says 'NONE' is a *special bidding strategy type used to reset the 
bidding strategy at AdGroup and AdGroupCriterion*.
It did have some effects but not what I expected.

Before change: (I'm using Python and this dict is what I got from the API)

'biddingStrategyConfiguration': {
'biddingStrategyId': None,
'biddingStrategyName': None,
'biddingStrategyType': 'MANUAL_CPC',
'biddingStrategySource': None,
'biddingScheme': None,
'bids': [
{
'Bids.Type': 'CpcBid',
'bid': {
'ComparableValue.Type': 'Money',
'microAmount': 1100
},
'cpcBidSource': 'CRITERION'
}
],
'targetRoasOverride': None
},


After change:

'biddingStrategyConfiguration': {
'biddingStrategyId': None,
'biddingStrategyName': None,
'biddingStrategyType': 'MANUAL_CPC',
'biddingStrategySource': 'CAMPAIGN',
'biddingScheme': {
'BiddingScheme.Type': 'ManualCpcBiddingScheme',
'enhancedCpcEnabled': True
},
'bids': [
{
'Bids.Type': 'CpcBid',
'bid': {
'ComparableValue.Type': 'Money',
'microAmount': 1100
},
'cpcBidSource': 'CRITERION' # the cpcBidSource is still 
'CRITERION'
},
{
'Bids.Type': 'CpmBid',
'bid': {
'ComparableValue.Type': 'Money',
'microAmount': 100
},
'cpmBidSource': 'ADGROUP'   # this bid value appears after 
change
}
],
'targetRoasOverride': None
},


I also tried passing an empty "biddingStrategyConfiguration.bids" list but 
it doesn't help too.

Can you tell me what I'm supposed to do? Thanks in advance.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a03c9d78-f144-495a-81e8-bfc7210d4fb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.