Re: Digest for adwords-api@googlegroups.com - 25 updates in 14 topics

245 views
Skip to first unread message

Ratthaphon Parasri

unread,
Jan 12, 2022, 10:55:44 PM1/12/22
to adwor...@googlegroups.com
Thanks

On Wed, Jan 12, 2022, 06:17 <adwor...@googlegroups.com> wrote:
Wayne <cos.squa...@gmail.com>: Jan 11 04:45AM -0800

Hi!
Hope you're doing well.
 
I have a question.
When I am creating campaign like this
 
MutateCampaignsResponse response = campaignServiceClient.mutateCampaigns(
customerId, operations);
for (MutateCampaignResult result : response.getResultsList()) {
String createdCampaign = result.getResourceName();
}
 
Since "result" only contains the resource name, I am only able to get the
resource name of the newly created campaign! Is there any way to fetch the
entire Campaign object which was created on Google? (Without any GET call/
query)
 
Thanks.
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 11 03:03PM

Hi Wayne,
 
Thanks for reaching out. To fetch the entire campaign object with all of its attributes, you must issue a GET request.
 
You can create a campaign object, referencing an existing campaign with:
 
Campaign campaign =
Campaign.newBuilder()
.setResourceName(ResourceNames.campaign(customerId, campaignId))
 
Regards,
Matt
Google Ads API Team
 
Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2UinQf:ref
Wayne <cos.squa...@gmail.com>: Jan 11 10:17PM -0800

Thanks Matt for the quick response there!
 
I had a doubt, wouldn't GET request be a not-so-good idea, since there is a
limit on GET requests(1000/day)? Further we don't want to make any external
Google API call.
All we need is the campaign ID from the resource name! Is there a function
for that without making a GET / Search request ? This would be quite
helpful since we can't change the Database schema at our end. All primary
keys are campaign ID, adgroup ID and so on... We can't change it to
campaign resource name or adgroup resource name. Please help us in figuring
out how to extract the campaign ID from the resource name WITHOUT making an
API call to Google!
 
Help would be appreciated. Thanks!
 
On Tuesday, January 11, 2022 at 8:34:17 PM UTC+5:30 adsapi wrote:
 
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 11 03:32PM

Hi Stefano,
 
In zshell this didn't create errors, but it didn't return the campaigns requested:
 
--data '{
"query": "
SELECT campaign.name FROM campaign WHERE campaign.name REGEXP_MATCH '\''.*\Q[campaign][product2]\E.*'\'' " , "returnTotalResultsCount": true
  }'
 
When echoing in my shell (zshell) the correct regex showed. Let me bring this up with my team. We will get back to you as soon as possible.
 
Regards,
 
Aryeh Baker
Google Ads API Team
ref:_00D1U1174p._5004Q2UiO2O:ref
"stefano...@webrepublic.ch" <stefano...@webrepublic.ch>: Jan 11 07:44AM -0800

Thank you Aryeh!
 
Looking forward to knowing the answer.
 
I found this on https://perldoc.perl.org/perlretut:
> \Q, \L, \l, \U, \u and \E are actually part of double-quotish syntax, and
not part of regexp syntax proper. They will work if they appear in a
regular expression embedded directly in a program, but not when contained
in a string that is interpolated in a pattern.
 
I'm not sure how to interpret this but maybe it will point your team in the
right direction.
 
Cheers
 
 
On Tuesday, January 11, 2022 at 4:32:33 PM UTC+1 adsapi wrote:
 
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 12 06:09AM

Hi Stefano,
 
We've raised this concern to the rest of our team and this is currently being investigated. In the meantime, one suggestion we received is that you may also try not using .* at the beginning and end, as that may also work as well.
 
Best regards,
 
Peter Laurence Napa Oliquino
Google Ads API Team
ref:_00D1U1174p._5004Q2UiO2O:ref
Chen Xiaowei <viviana...@gmail.com>: Jan 11 07:51PM -0800

Hi team, I want to get Audience segments like UI shows. I use
SELECT ad_group_audience_view.resource_name FROM ad_group_audience_view
SELECT campaign_audience_view.resource_name FROM campaign _audience_view
and API returns their resource_name which are only an id like customers/XXXXXX/adGroupAudienceViews/133416813831~326804463039.
How can I get more detailed information including audience segment name,
type,targeting setting and status. Thanks,Vivi
[image: audience segment.png]
Aliaksandr Larykau <alar...@cyberpublicity.com>: Jan 11 11:48AM -0800

Hello,
I'm trying to create price asset and attach to existing campaign, but
getting this error.
I don't have any further details, even though it mentioned that the details
will eventually be returned in ErrorDetails.
I couldn't find any documentation about the trigger and what that means.
 
I do have 3 price offerings per asset and i'm trying to attach just one
asset to campaign
 
This is the operation
Method:
/google.ads.googleads.v9.services.BatchJobService/AddBatchJobOperations
Host: googleads.googleapis.com
Headers: {
"developer-token": "REDACTED",
"login-customer-id": "4453717348",
"x-goog-api-client": "gl-python/3.7.12 grpc/1.42.0 gax/2.2.2 gccl/14.1.0",
"x-goog-request-params":
"resource_name=customers/1020222107/batchJobs/7836501996"
}
Request: resource_name: "customers/1020222107/batchJobs/7836501996"
mutate_operations {
campaign_asset_operation {
create {
field_type: PRICE
campaign: "customers/1020222107/campaigns/15646115994"
asset: "customers/1020222107/assets/19947194756"
}
}
}
Response
-------
Headers: {
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\";
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\";
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000;
v=\"46,43\"",
"content-disposition": "attachment",
"date": "Tue, 11 Jan 2022 19:32:06 GMT",
"request-id": "xnJrZEt8DpL8o8JJfaJlqA"
}
Response: total_operations: 1
next_sequence_token: "1ad6c96b963099396beda23f5bf5b70a"
 
And this is what I'm getting as a result of the operation
 
Headers: {
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\";
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\";
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000;
v=\"46,43\"",
"content-disposition": "attachment",
"date": "Tue, 11 Jan 2022 19:32:18 GMT",
"request-id": "7L0KSbK-okmnNNz1-Ztsxg"
}
Response: results {
status {
code: 3
message: "This request would exceed a limit on the number of allowed
resources. The details of which type of limit was exceeded will eventually
be returned in ErrorDetails., at
mutate_operations[0].campaign_asset_operation"
details {
[type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure]
{
errors {
error_code {
resource_count_limit_exceeded_error: RESOURCE_LIMIT
}
message: "This request would exceed a limit on the number of
allowed resources. The details of which type of limit was exceeded will
eventually be returned in ErrorDetails."
trigger {
string_value: "ENABLED_PRICE_ASSET_LINKS_PER_CAMPAIGN"
}
location {
field_path_elements {
field_name: "mutate_operations"
index: 0
}
field_path_elements {
field_name: "campaign_asset_operation"
}
}
}
}
}
}
}
 
Any help would be appreciated!
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 12 02:58AM

Hi,
 
Thanks for reaching out to the Google Ads API Forum.
 
I had to delete your post as it contained your logs. I am reposting below without the sensitive log information for reference :
 
“Hello,
 
I'm trying to create price asset and attach to existing campaign, but getting this error.
 
I don't have any further details, even though it mentioned that the details will eventually be returned in ErrorDetails.
 
I couldn't find any documentation about the trigger and what that means.
 
I do have 3 price offerings per asset and i'm trying to attach just one asset to campaign
 
This is the operation
 
Method: /google.ads.googleads.v9.services.BatchJobService/AddBatchJobOperations
 
Host: googleads.googleapis.com
 
Headers: {
 
"developer-token": "REDACTED",
 
"login-customer-id": "**",
 
"x-goog-api-client": "",
 
"x-goog-request-params": "resource_name=customers/***/batchJobs/***"
 
}
 
Request: resource_name: "customers/***/batchJobs/***"
 
mutate_operations {
 
campaign_asset_operation {
 
create {
 
field_type: PRICE
 
campaign: "customers/***/campaigns/**"
 
asset: "customers/***/assets/**"
 
}
 
}
 
}
 
Response
 
-------
 
Headers: {
 
 
"request-id": "**"
 
}
 
Response: total_operations: 1
 
next_sequence_token: "**"
 
And this is what I'm getting as a result of the operation
 
Response: results {
 
status {
 
code: 3
 
message: "This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails., at mutate_operations[0].campaign_asset_operation"
 
details {
 
[type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure] {
 
errors {
 
error_code {
 
resource_count_limit_exceeded_error: RESOURCE_LIMIT
 
}
 
message: "This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails."
 
trigger {
 
string_value: "ENABLED_PRICE_ASSET_LINKS_PER_CAMPAIGN"
 
}
 
location {
 
field_path_elements {
 
field_name: "mutate_operations"
 
index: 0
 
}
 
field_path_elements {
 
field_name: "campaign_asset_operation"
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
 
Any help would be appreciated!
 
--”
 
 
It seems you are trying to create a price asset using AddBatchJobOperations. I can see that you’re using only one operation in Batch Job. Since ErrorDetails is not returned in AddBatchJobOperations, could you please retry your API request with CampaignAssetOperation without a batch job, so this will provide additional error details from the ErrorDetails class? You provide us with the complete request and response logs with the request-id generated via the Reply privately to author option, so our team can investigate further.
 
Regards,
 
Yasar
Google Ads API Team
ref:_00D1U1174p._5004Q2UizKa:ref
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 11 01:45PM

Hi there,
 
You may modify the Get Account Hierarchy sample by adding a customer report pull for each customer Id of each production account. Feel free to get back to us.
 
Regards,
 
Aryeh Baker
Google Ads API Team
ref:_00D1U1174p._5004Q2UikHa:ref
Hao Long <hal...@ebay.com>: Jan 11 06:50PM -0800

Hi Baker,
 
Thanks for your updates, i know your points we could draft query from
customer_client(https://developers.google.com/google-ads/api/fields/v9/customer_client)
but we can not find the relationship for some fields, such as from google
adwords *getEffectiveConversionTrackingId* to google ads which field
 
could you please help provide below fields relationship between adwords and
ads api?
 
adwords fields:
 
customer.getCanManageClients,
customer.getParallelTrackingEnabled,
customer.getConversionTrackingSettings.getEffectiveConversionTrackingId,
 
 
On Tuesday, January 11, 2022 at 9:45:22 PM UTC+8 adsapi wrote:
 
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 11 02:15PM

Hi Alex,
 
Thanks for reaching out. The bidding_strategy resource is an attributed resource of ad_group in the Ads API. You can use the query migration tool to translate AWQL queries to GAQL.
 
Regards,
Matt
Google Ads API Team
 
Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2UikrE:ref
Alex Portnoy <al...@barkingadmedia.com>: Jan 11 06:35AM -0800

Hi, thank you for your answer.
I have already raise that issue regarding the GAQL.
Now tried to retrieve this attribute using the API but same as with the
GAQL it is missing at the AdGroup level. (it does work for AWQL report)
Here is the thread
<https://groups.google.com/g/adwords-scripts/c/ufICM_9DBYA/m/tuudBhHMDAAJ>
for the missing attribute in GAQL.
 
Here is the script that i run to fetch it using GAQL:
Script name : bidding_strategy_missing
CID: 1150169919
 
Please advise on how to get the attribute at the ad_group level using your
API or GAQL .
Thanks
 
On Tuesday, January 11, 2022 at 4:16:04 PM UTC+2 adsapi wrote:
 
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 12 02:14AM

Hi Alex,
 
Thank you for the additional details.
 
You mentioned that "Now tried to retrieve this attribute using the API but same as with the GAQL it is missing at the AdGroup level. (it does work for AWQL report)", that said, could you provide our team the generated and complete request and response logs, with the request-id, of this particular API request that did not return the value you expected?
 
If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > 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.
 
Best regards,
 
Peter Laurence Napa Oliquino
Google Ads API Team
ref:_00D1U1174p._5004Q2UikrE:ref
Patient News <patient...@gmail.com>: Jan 11 11:59AM -0800

Hi,
 
I am using google-ads-api package by npm to display reporting information
in our application. I found an issue that even after changing the
publishing status to 'production', the OAuth2 access would revoke
automatically after about one month.
I will have to create a new refresh token to make my ads-api work.
 
I want google-ads-api to continuously work on my application. Can anyone
please help me fix this issue?
 
Thank you
 
Shashikanth
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 12 01:16AM

Hi Shashikanth,
 
Thank you for posting your concern.
 
You may check on your end if you encounter one of the reasons specified on this document why your refresh token is expiring. If upon checking you determine that you did not encounter the possible reasons said in the document, then I would suggest to reach out to the Oauth2 team via this link. I routed you to their team because they are more equipped to check the issues and concerns related to the refresh token.
 
Regards,
 
Ernie John Blanca Tacata
Google Ads API Team
ref:_00D1U1174p._5004Q2UizVF:ref
"Tiana S." <ti...@swydo.com>: Jan 11 04:31AM -0800

Hi Peter,
 
Replied privately with a screenshot of the local ads being available in the
UI. Hope this helps!
 
Thanks,
 
Tiana
 
On Wednesday, 3 November 2021 at 04:13:49 UTC+1 adsapi wrote:
 
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 11 08:25PM

Hi Tiana,
 
Peter replied to you privately, though it seems you may not have received his message. Please see his message below:
 
Thank you so much for sharing this screenshot.
 
Upon checking, you should be able to create local ads (and not local service ads) for your local campaigns.
 
In addition, local ads records should then be available via the ad_group_ad, and if you specifically filter using ad_group_ad.ad.type = LOCAL_AD. I hope this helps.
Regards,
Matt
Google Ads API Team
 
Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2QHDpG:ref
"Michael Schütz" <michaels...@gmail.com>: Jan 11 11:56AM -0800

Hi Matt,
 
this can be closed. Issue resulted in different level of MCC and proper
billing settings.
 
We just wonder how error prone it is, to iterate all accounts to just
receive total number of 4 different billing setting ids, in our case. Seems
we need to set cron to frequently gather those complete list of ids.
Having this, we can receive all data, seems.
 
Best
Michael
 
 
adsapi schrieb am Montag, 10. Januar 2022 um 19:22:35 UTC+1:
 
"Michael Schütz" <michaels...@gmail.com>: Jan 11 11:51AM -0800

Hi Aryeh
 
thx a lot for you fast reply. I will do follow dev blog as proposed.
 
 
Best
Michael
 
 
adsapi schrieb am Montag, 10. Januar 2022 um 16:34:23 UTC+1:
 
Frank Lazur <frank...@google.com>: Jan 11 10:19AM -0800

Hi, yes I am the Google representative for the client. Will contact the
product team now, thank you.
 
On Monday, January 10, 2022 at 10:54:30 PM UTC-8 adsapi wrote:
 
arion a <arion...@gmail.com>: Jan 11 08:32AM -0800

thank you
 
On Monday, January 10, 2022 at 11:36:18 PM UTC+2 adsapi wrote:
 
Meir Mouyal <meca...@gmail.com>: Jan 11 03:53AM -0800

This is the response body from another request
 
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type":
"type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"requestError": "UNKNOWN"
},
"message": "The error code is not in this version.",
"trigger": {
"stringValue": ""
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "selective_optimization"
},
{
"fieldName": "conversion_actions"
}
]
}
}
],
"requestId": "AhDzrzsd2AbbKNgSVaqoCQ"
}
]
}
}
 
El martes, 11 de enero de 2022 a las 11:13:03 UTC+1, Meir Mouyal escribió:
 
Google Ads API Forum Advisor <ads...@forumsupport.google>: Jan 11 02:19PM

Hi Meir,
 
Thanks for reaching out. Can you please privately provide us with the complete request and response logs so we can take a closer look?
 
Thanks,
Matt
Google Ads API Team
 
Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2UilMH:ref
"panu.kuu...@hopkins.fi" <panu.kuu...@hopkins.fi>: Jan 11 04:14AM -0800

Thanks will do.
 
On Friday, January 7, 2022 at 3:03:47 AM UTC adsapi wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adwords-api...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages