Python How to set up campaign bid adjustment

2022-03-09 Thread Kieran Eddy
 #bid modifier
# campaign_operation=client.get_type(
# "CampaignOperation"
# )
# campaign_criterion= campaign_criterion_operation_bid.create
# campaign_criterion_operation_bid=client.get_type(
# "CampaignCriterionOperation"
# )
# campaign_criterion= campaign_criterion_operation_bid.create

# campaign_criterion.bid_modifier=0.0
# # campaign_criterion.campaign = campaign_resource_name

# campaign_criterion_operations.append(campaign_criterion_operation_bid)
#修改设备类型
# campaign_criterion_operation_type=client.get_type(
# "CampaignCriterionOperation"
# )
# campaign_criterion= campaign_criterion_operation_type.create
# # campaign_criterion.type=client.enums.TypeEnum.MOBILE_DEVICE
# # campaign_criterion.status=client.enums.CampaignCriterionStatus.ENABLED 
# campaign_criterion.campaign = campaign_resource_name
# campaign_criterion_operations.append(campaign_criterion_operation_type)
Why would an error be reported for such a modification? How should I modify 
it?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/d41b851f-f835-4e13-98eb-0307ae2ae8ffn%40googlegroups.com.


RE: all_conversion_value returns zero in Google Ads API, but works in Google Adwords API

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi,

Thank you for posting your concern to our team.

To investigate the issue, could you provide the complete request and response 
logs with request ID and request header generated on your end where we can see 
the error?

You can provide it via Reply privately to author option. If this option is not 
available, then send it instead on this email address 
googleadsapi-supp...@google.com.

Regards,

Ernie John
Google Ads API Team
ref:_00D1U1174p._5004Q2XnAQ2: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/w8NJB0R8IL5300PxPY4kw7Qm--hoR6hW54jg%40sfdc.net.


RE: Extra Adword scopes in OAuth Consent screen?

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi everyone,

@Vanessa, it appears that our colleague has responded on a separate thread 
(grantOfflineAccess Necessary Scopes) that you opened. The post was deleted but 
our team was still able to respond. For further clarifications and better 
tracking, we can continue discussions on that thread instead.

As for the original post, are these options displayed in the UI / consent 
screen? If yes, then the more appropriate team to provide guidance related to 
these items should be the Google API Console support team, which you can reach 
out to via this link. I hope this helps.

Best regards,

Peter Laurence
Google Ads API Team
ref:_00D1U1174p._5004Q2Xmuwl: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/-on3F0R8IEV900JjHDaHcrTkSbS9b9HQ_BCg%40sfdc.net.


Re: Is there an API to get web-site category/vertical?

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi,

Thank you for the additional information.

You may try and use the topic_constant report or, the user_interest report as 
it specializes in : A user interest: a particular interest-based vertical to be 
targeted.

Let us know if this is what you're looking for.

Best regards,

Peter Laurence
Google Ads API Team
ref:_00D1U1174p._5004Q2Xl6m6: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/LQkpq0R8IENP00mYFIye95Sq-yT60XFKeryg%40sfdc.net.


How to set up campaign bid adjustment

2022-03-09 Thread Kieran Eddy
I want to set the bid adjustment of campaign to computer-100% and 
tablets-100%. How to set it? Thank you very much for helping me

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/b2fbf5f0-0f9c-4c89-acaa-5a4f0c5e9285n%40googlegroups.com.


all_conversion_value returns zero in Google Ads API, but works in Google Adwords API

2022-03-09 Thread Ершов Александр
Hello!
This code works correctly in the Google Adwords API

$query = (new ReportQueryBuilder())

->select([

'AllConversionValue', 'Cost', 'Device'

])

->from(ReportDefinitionReportType::ACCOUNT_PERFORMANCE_REPORT)

->duringDateRange(ReportDefinitionDateRangeType::TODAY)

->build();

but the new one ( I used conversion tool 
https://developers-dot-devsite-v2-prod.appspot.com/google-ads/api/docs/migration/query-migration-tool_a8523c3e61730f1a26af89941c07e858bcc10faf0d6c1a006181be96d8c0b4fb.frame?hl=ru#loaded
  
) returns all_conversion_value, equal to zero (but cost value is correct 
for all segments)

SELECT metrics.all_conversions_value, metrics.cost_micros, segments.device 
FROM customer WHERE segments.date DURING TODAY

The requests are done to the same account, it's been verified.


Could you please take a look, when you have time?

Best regards API

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/8ab8ec7d-c2a9-4b1a-9653-b5f2b07b1d3dn%40googlegroups.com.


RE: *** AttributeError: 'NoneType' object has no attribute 'Call'

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Corine,

Thank you for reaching out to us.

Could you confirm whether the client library was configured as per this guide ? 
And is this the example code you are using or referring to? If you haven't yet, 
you may also enable logging for us to see the possible cause of the issue and 
the contents of your request. You may then retry your request to generate the 
logs and so our team can further investigate.

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 googleadsapi-supp...@google.com alias instead

Best regards,

Heidi
Google Ads API Team
ref:_00D1U1174p._5004Q2XmwrT: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/GIzmn0R8ID8F00yCK2xgoMRLGLleZXnMAH0g%40sfdc.net.


RE: AdsScript - PERFORMANCE_MAX campaigns

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Rafael,

Thank you for reaching out to Google Ads API team.

It seems that your concern is about Google Ads Scripts. With this, I would 
recommend posting your concern to the Google Ads Scripts Forum. The said forum 
is dedicated to Google Ads script related concerns so you can get helpful 
insights there to address your concern.

Let us know if you have any questions.

Regards,

Carmela
Google Ads API Team
ref:_00D1U1174p._5004Q2Xmxyv: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/nx63N0R8IBGN0094tmoMM8TUuKRWtsZ-t_aA%40sfdc.net.


Re: Target CPA with Goal Settings

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Matteo,

Thank you for your reply.

This section of the guide sent by Ernie provides the steps on how you can 
achieve this. When performing the steps, you can use the BathJobService since 
its mutate operation supports both the custom_conversion_goal_operation and 
conversion_goal_campaign_config_operation.

Best regards,

Peter Laurence
Google Ads API Team
ref:_00D1U1174p._5004Q2XmToS: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/JKigv0R8IAYO003yCe3TFiTXuBXhobjBUj9Q%40sfdc.net.


RE: grantOfflineAccess Necessary Scopes

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Vanessa,

Thank you for reaching out to us.

To request offline access for a web app type, make sure you set the access_type 
parameter to offline. You can find additional information in Google's OAuth2 
guide .

For the desktop app type, offline access is enabled by default—you don't have 
to explicitly request it. Kindly check this documentation for more details.

Let us know if this is what you're looking for. If not, you may provide 
additional details so we can also provide the appropriate recommendations.

Best regards,

Heidi
Google Ads API Team
ref:_00D1U1174p._5004Q2Xmv6W: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/xiGAR0R8I8V500lhsxj1uiQH-4evInxcFyVQ%40sfdc.net.


Re: GeoPerformance Report Migration

2022-03-09 Thread jubap...@gmail.com
I also tried using user_location_view, 
user_location_view.country_critterion_id, then got a third version report.
On Wednesday, March 9, 2022 at 9:54:57 AM UTC-8 jubap...@gmail.com wrote:

> Hi, 
> I would like to have a geo performance report with a specific campaing ID
> I used to use  'GEO_PERFORMANCE_REPORT' date range report.
> Fields I am using is below.:
> report_type_geo = 'GEO_PERFORMANCE_REPORT'
> fields_geo = ['CityCriteriaId', 'CountryCriteriaId', 'MetroCriteriaId', 
> 'MostSpecificCriteriaId', 'RegionCriteriaId', 
> 'Impressions','CampaignName','CampaignId','AdGroupName','Clicks', 'Cost', 
> 'Conversions', ConversionValue']
> start_date, end_date example : 2022-01-08 , 2022-01-010
>
> Now, I am using 'SearchGoogleAdsStreamRequest' with metrics 
> geographic_view.
> query example below:
> SELECT segments.geo_target_city,
> geographic_view.country_criterion_id, 
> segments.geo_target_metro, 
> segments.geo_target_most_specific_location, 
> segments.geo_target_region,
> metrics.impressions, 
> campaign.name, 
> campaign.id, 
> ad_group.name, 
> metrics.clicks, 
> metrics.cost_micros, 
> metrics.conversions, 
> metrics.conversions_value 
> FROM geographic_view
> WHERE segments.date BETWEEN '"""  + start_date + """' AND '""" + 
> end_date + """'
>
> This query can help me concat the right format report I want however, the 
> report will be slightly different between GoogleAds API and AdWords API. 
> Do I need other segments for  GoogleAds API for my report? 
>
> Thank you!
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/b1371fee-45b9-47bc-8e74-86a089edeeban%40googlegroups.com.


Re: Google Ads API keyword performance report

2022-03-09 Thread jubap...@gmail.com
Hi, Carmela

Thanks for the tips! Resource Mapping is really helpful!
Now I know that 'ID' will be corresponding to 
'ad_group_criterion.criterion_id'.
However, I want to get ad_group_criterion.criterion_id and a couple of 
metrics in this report, and select from ad_group_criterion can not select 
or filter on metrics. Any suggestions at this point?

For the updating status of the keywords. the resource name format is 
customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}
for this format, the criterion_id is ad_group_criterion.criterion_id, 
correct? 
I got confused about the name criterion_id. Is it an id that will be 
different if I use a different service?
like If I am using the adGroupBidModifier service, the criterion_id will be 
the platform like desktop, mobile.
This means criterion_id needs to match with service to achieve different 
services? 

Thank you


On Tuesday, March 8, 2022 at 10:41:05 PM UTC-8 adsapi wrote:

> Hi,
>
> Thank you for raising this concern to Google Ads API team.
>
> I see that your concern is mainly about keyword fields. With this, you can 
> use this Resource Mapping 
> 
>  on 
> mapping fields on both AdWords API and Google Ads API for keywords fields.
>
> As for updating the status of the keywords, you can use the 
> AdGroupCriterionOperation update 
> 
>  of 
> the AdGroupCriterionService.MutateAdGroupCriteria 
> 
>  to 
> change the status 
> 
>  field 
> of the keyword criterion. Please note that the *update* operation 
> requires resource name 
> 
>  so 
> that the API will know which criterion needs to update.
>
> I hope this helps. Let us know if you have any questions.
>
> Regards,
> [image: Google Logo] 
> Carmela 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2XmeLo: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/2ace108f-aec7-40a9-a5b8-5cfddfb0026fn%40googlegroups.com.


Re: Retrieve each campaigns geographic target

2022-03-09 Thread scratch27

Hi Jinky,

Thank you for you help.

How do I get the campaign name from the Geo Target Constant please?
I can't get it in my query, could you write down the query please?

Massive thanks!
Le mercredi 9 mars 2022 à 16:32:04 UTC+1, adsapi a écrit :

> Hi Scratch,
>
> Thank you for the replies. I work with Darwin and allow me to provide 
> support here.
>
> The geographic_view could not return the country ID in ISO format. The 
> geographic_view.country_criterion_id 
> 
>  will 
> only return the criterion ID of specific geo based on this document 
> . 
> With this, if you want to get the country ID in ISO format then you will 
> need to make another report using the geo_target_constant 
> 
>  and 
> including the geo_target_constant.country_code 
> 
> .
>
> Best regards,
> [image: Google Logo] 
> Jinky 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2XmRLE: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/785bdc74-1609-4243-a625-e21f45257903n%40googlegroups.com.


Google Ads API Image Ad Extension

2022-03-09 Thread Julius Decena
Good day,

We are planning to implement Google Ads Image Extension in our system.

We are using a sandbox account to test this functionality and we were 
getting an error that says it's not compatible with the campaign type. Is 
this error related to the fact that there are requirements for an ad 
account in order to be eligible for image extensions? If yes, is there a 
way to test this functionality with a sandbox account? We wouldn't want to 
test this with a live customer account.

Regards,
Julius Decena

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/01a49a9d-8f70-4360-bb27-dd646eb2c45fn%40googlegroups.com.


Issue with metrics.cost_per_all_conversions and search_term_view

2022-03-09 Thread tim ogilvie
Hi

When querying search_term_view only 1 of 18 search terms is returing a cost 
with this query:

""" 
SELECT search_term_view.search_term,
segments.keyword.info.match_type,
search_term_view.status,
campaign.name,
ad_group.name,
metrics.clicks,
metrics.impressions,
metrics.ctr,
metrics.average_cpc,
metrics.cost_micros,
metrics.cost_per_all_conversions,
campaign.advertising_channel_type
FROM search_term_view
"""

Any idea why?

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/21372a03-abe0-433e-b113-4c160499160fn%40googlegroups.com.


facing issues with GetReportDownloader while migrating to google adwords to ads api

2022-03-09 Thread 'srinivas satyavarapu' via Google Ads API and AdWords API Forum
Hi Team,

Could someone help me in below code as i am not able find exact refrence 
eventhough i tried using different highlighted error syntax

#from googleads import adwords
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.errors import GoogleAdsException
from datetime import date, timedelta, datetime

import math
import pandas
import argparse
import os

import locale
import sys
import _locale

_locale._getdefaultlocale = (lambda *args: ['en_US', 'UTF-8'])

def main(client):
# Initialize appropriate service.
#report_downloader = client.GetReportDownloader(version='v201809')
ga_service = client.get_service("GoogleAdsService")

# Define date ranges.
end_date = datetime.today().strftime('%Y%m%d')
start_date = (datetime.today() - timedelta(180)).strftime('%Y%m%d')

# Create report query.
report_query = (
"""
SELECT segments.date, 
campaign.name, 
campaign.id, 
campaign.status,
campaign.campaign_budget,
campaign_budget.amount_micros, 
metrics.conversions, 
metrics.impressions, 
metrics.clicks,
metrics.cost_micros, 
metrics.ctr FROM campaign 
WHERE campaign.status IN ("ENABLED","PAUSED")
DURING {start_date}, {end_date}
"""
)
include_zero_impression_flag = True

file_path = 'C:/New folder/Output Files/Adwords report pull/'
file_name = 'MarketPlace_daily_campaign_performance_report.csv'
f = open(os.path.join(file_path, file_name), 'wb')

# including the SKUs with zero_impressions
 


*   ga_service.  (report_query.format(**{'start_date': start_date, 
'end_date': end_date}), 'CSV', f, skip_report_header=True,  
   skip_column_header=False, 
skip_report_summary=True,
 include_zero_impressions=include_zero_impression_flag)
print("Downloading to {0}..".format(os.path.join(file_path, 
file_name)))*


if __name__ == '__main__':
  # Initialize client object.
  #adwords_client = 
adwords.AdWordsClient.LoadFromStorage('D:\MBB\yaml\MarketPlace_daily_access.yaml')
 googleads_client = 
GoogleAdsClient.load_from_storage('D:\MBB\yaml\MarketPlace_daily_access.yaml')

  main(googleads_client)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/102c65bb-6b42-4a4f-85bd-329f09cb402dn%40googlegroups.com.


Empty response with chosen fields

2022-03-09 Thread Rafeek Nasrallah
Hello,

I am migrating from Adwords api to Ads api and im facing a problem with the 
field 
"segments.keyword.ad_group_criterion" from "ad_group_ad"

I have an Adperformance report with multiple fields, once i run my code 
*without 
*the "segments.keyword.ad_group_criterion", it works and i get my data. 
once i add the "segments.keyword.ad_group_criterion" field to the list of 
fields, i receive empty data.

On another data, this field worked with only one extra field 
(ad_group_ad.ad.id) . 
*BUT ONLY WHEN THE " ad_group_ad.ad.id " FIELD WAS CALLED BEFORE THE 
"segments.keyword.ad_group_criterion". *

i would appreciate every single help.

Thank you.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/e241403f-e6b8-4859-bc06-9ed879b85505n%40googlegroups.com.


GeoPerformance Report Migration

2022-03-09 Thread jubap...@gmail.com
Hi, 
I would like to have a geo performance report with a specific campaing ID
I used to use  'GEO_PERFORMANCE_REPORT' date range report.
Fields I am using is below.:
report_type_geo = 'GEO_PERFORMANCE_REPORT'
fields_geo = ['CityCriteriaId', 'CountryCriteriaId', 'MetroCriteriaId', 
'MostSpecificCriteriaId', 'RegionCriteriaId', 
'Impressions','CampaignName','CampaignId','AdGroupName','Clicks', 'Cost', 
'Conversions', ConversionValue']
start_date, end_date example : 2022-01-08 , 2022-01-010

Now, I am using 'SearchGoogleAdsStreamRequest' with metrics geographic_view.
query example below:
SELECT segments.geo_target_city,
geographic_view.country_criterion_id, 
segments.geo_target_metro, 
segments.geo_target_most_specific_location, 
segments.geo_target_region,
metrics.impressions, 
campaign.name, 
campaign.id, 
ad_group.name, 
metrics.clicks, 
metrics.cost_micros, 
metrics.conversions, 
metrics.conversions_value 
FROM geographic_view
WHERE segments.date BETWEEN '"""  + start_date + """' AND '""" + 
end_date + """'

This query can help me concat the right format report I want however, the 
report will be slightly different between GoogleAds API and AdWords API. Do 
I need other segments for  GoogleAds API for my report? 

Thank you!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/dac819dc-1756-441b-9222-16c275444b40n%40googlegroups.com.


discrepancies in keyword plan historical data in UI and API

2022-03-09 Thread Stan V
Hello,
i see significant discrepancies between average monthly searches that i see 
in UI and the values i get from API (30-40%) for all keywords.
Month and year are the same in API call and in UI. What could be the reason?
My python script below, thanks for help!

client = GoogleAdsClient.load_from_dict(credentials)

keyword_plan_service = client.get_service("KeywordPlanService")
metric_request = client.get_type("GenerateHistoricalMetricsRequest")
resource_name = keyword_plan_service.keyword_plan_path('1234', '5678')

metric_request.keyword_plan = resource_name
metric_request.historical_metrics_options.year_month_range.start.year=2021
metric_request.historical_metrics_options.year_month_range.start.month=client.get_type("MonthOfYearEnum").MonthOfYear.MARCH
metric_request.historical_metrics_options.year_month_range.end.year=2021
metric_request.historical_metrics_options.year_month_range.end.month=client.get_type("MonthOfYearEnum").MonthOfYear.MARCH

response = keyword_plan_service.generate_historical_metrics(metric_request)

for record in response.metrics:
  print({
"search_query": record.search_query,
"avg_monthly_searches": record.keyword_metrics.avg_monthly_searches,
  })

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/adbe1211-9d74-494c-8cb9-9bc747427a07n%40googlegroups.com.


AdsScript - PERFORMANCE_MAX campaigns

2022-03-09 Thread 'Rafael Setti' via Google Ads API and AdWords API Forum
Hello! I'm exporting a campaign report to Big Query tables. For that, I'm 
using google Ads v10 API. The script is working good. 
Therefore, *I'm having issues to get PERFORMANCE_MAX campaigns in my report*
. 
I'm also generating the report with the AdsApp.search function.
I'd like to know how can I fix this problem.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/acb562ad-c7cb-4cc3-bf23-e36feec74480n%40googlegroups.com.


*** AttributeError: 'NoneType' object has no attribute 'Call'

2022-03-09 Thread Corine Morin
We recently migrated to Google API V9, and we encounter this problem when 
trying to
create a new account budget proposal:

We use Python 3.8

service = self.google_client.get_service('AccountBudgetProposalService')
service.mutate_account_budget_proposal(customer_id=, 
operation=operation)

*Operation: *
create {
  proposal_type: CREATE
  billing_setup: "customers//billingSetups/6723730110"
  proposed_name: ""
  proposed_spending_limit_micros: 8726
}


*API Response:*
WARNING 2022-03-09 11:06:25,041 logging_interceptor 18439 140231374133056 
Request made: ClientCustomerId: , Host: googleads.googleapis.com, 
Method: 
/google.ads.googleads.v9.services.AccountBudgetProposalService/MutateAccountBudgetProposal,
 
RequestId: t3pXNXkT4WSIGtsv_lBP1Q, IsFault: True, FaultMessage: Internal 
error encountered.
 AttributeError: 'NoneType' object has no attribute 'Call'*

We are unable to create account_budget_proposal ... why is the API 
returning " AttributeError: 'NoneType' object has no attribute 'Call'" *how 
are we suppose to fix this?

Corine

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/eec4e4f5-b395-4eda-a0ea-6ad44b10d478n%40googlegroups.com.


RE: Not result with example getCampaign in google-ads-php

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Vladimir,

Thanks for reaching out. Can you privately provide us with your complete 
request and response logs? Please ensure logging for the PHP client library is 
enabled (more info, here).

Regards,
Matt
Google Ads API Team

Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2XmqGm: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/MpA9j0R8HIQZ00eB6l2xvWRQiqrzOnhijDQQ%40sfdc.net.


Re: Retrieve each campaigns geographic target

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Scratch,

Thank you for the replies. I work with Darwin and allow me to provide support 
here.

The geographic_view could not return the country ID in ISO format. The 
geographic_view.country_criterion_id will only return the criterion ID of 
specific geo based on this document. With this, if you want to get the country 
ID in ISO format then you will need to make another report using the 
geo_target_constant and including the geo_target_constant.country_code.

Best regards,

Jinky
Google Ads API Team
ref:_00D1U1174p._5004Q2XmRLE: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/Q2DOX0R8HHSG00s3uLDukXTXm-h4b_hP4FoA%40sfdc.net.


grantOfflineAccess Necessary Scopes

2022-03-09 Thread Vanessa Maccherini
Hello, 

I am developing an app which has recently been approved. I want to add to 
my project the method grantOfflineAccess but I cannot figure out if I need 
additional scopes to include that. So, which permissions do I need to 
include??
All help is accepted.

Kindly, Vanessa M.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/c6b75be5-13ef-4a71-b14d-1afe3a927bafn%40googlegroups.com.


Re: Is there an API to get web-site category/vertical?

2022-03-09 Thread thes...@gmail.com
Hi, thanks. Google has a list of 
verticals https://developers.google.com/adwords/api/docs/appendix/verticals. 
We want to know using what API call can I get vertical for a specific 
website.  For example, I want to request bbc.com and get a response that it 
is /News vertical(category). Using what API call I can do this? A couple of 
years ago I found some API for doing this. Maybe from Google ML platform. 
But now can't find it.
 
пятница, 4 марта 2022 г. в 16:46:29 UTC+2, adsapi: 

> Hi,
>
> Thank you for reaching out to the Google Ads API support team.
>
> Could you please provide full screen screenshot of the UI of what you are 
> looking for via reply privately autor option, so we can further investigate 
> the issue?
>
> Thanks,
> [image: Google Logo] 
> Nirmita 
> Google Ads API Team 
>   
>  
>
> ref:_00D1U1174p._5004Q2Xl6m6: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/364b4883-9472-4596-b4d1-936e86c5d103n%40googlegroups.com.


Re: Extra Adword scopes in OAuth Consent screen?

2022-03-09 Thread Vanessa Maccherini
Hello, 

I am having. similar issue. Did you figure out which permissions it was 
including and why?

Kindly,
Vanessa M.

Il giorno lunedì 25 gennaio 2021 alle 23:11:19 UTC+1 over...@gmail.com ha 
scritto:

> Hello, I am using the gapi library and using the grantOfflineAccess() 
> method to get an authorization scope for a user. I plan on using this code 
> to get an authorization code which would then be used to make calls to 
> google ads api on a backend server. I am requesting in my script '
> https://www.googleapis.com/auth/adwords' scope only. In my Google 
> developers console I only have 'https://www.googleapis.com/auth/adwords' 
> selected as my oauth consent screen scopes. However when the user logs in 
> and approves permissions they are being asked for these permissions: 
>
>- View users on your domain
>- See and download your contacts
>- Manage your Adwords campaigns
>
> Are these first two extra permissions related to adwords scope? Is there a 
> hidden area where these extra scopes are being requested? I don't think I 
> need them.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/42fe9b9b-2d71-4ca1-be6c-a782e5d3d36cn%40googlegroups.com.


Batch job service roll back if errors

2022-03-09 Thread Patrick
Hi,

Is there a way to validate a batch job or roll back a batch job if there 
are any errors when creating a campaign?

So kind of like setting partial_failures to false but for the batch job?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/5144d271-ec8a-47a2-9923-c91e05f5c2b6n%40googlegroups.com.


Re: Target CPA with Goal Settings

2022-03-09 Thread Matteo Medda
Hi Ernie,
Thanks for the infos.
We are looking at the documentation, but we are unsure at what point in the 
flow we can assign a custom conversion goal to a campaign.

Do we need to set the custom goal after creating the campaign?
We use batchJobs, is it possible to do everything in the creation phase?

Thx,
Matteo
On Wednesday, 9 March 2022 at 04:24:57 UTC+1 adsapi wrote:

> Hi Matteo,
>
> Thank you for providing more details to your concern.
>
> I am afraid that there is no sample code for custom conversion goals and 
> how to associate it to your campaign. However, I would suggest referring to 
> this document 
> 
>  as 
> the services and reports that you can use to manage it have been discussed 
> there.
>
> Let me know if you have further questions. 
>
> Regards,
> [image: Google Logo] 
> Ernie John 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2XmToS: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/386a56ec-1753-47a5-8fa6-bbb9db83a557n%40googlegroups.com.


Re: Dynamically change client id in adsapi_php.ini file of Googleads php library

2022-03-09 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Hemant,

Thank you for the reply.

To answer your question, please note that the campaign has type and subtype and 
the equivalent fields of those information are provided below:
campaign.advertising_channel_type ​​​
campaign.advertising_channel_sub_type

With this, you can include those fields in the keyword_view report together 
with the ad_group_criterion.labels, campaign.name and the 
ad_group_criterion.keyword.text fields.

Let me know if you have further questions.

Regards,

Ernie John
Google Ads API Team
ref:_00D1U1174p._5004Q2XmYZw: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/NfSse0R8H59400DVppqkHQSim23uFX17uzSg%40sfdc.net.


Why am I not getting a list of all campaigns when using the google-ads-php getCampaigns example library?

2022-03-09 Thread Vladimir Hiuk
As a result of executing the code below, I do not receive any 
data. Although, for example, such an example as GetAccountHierarchy works 
for me. I am currently working on migrating a running project from adWords 
API to Ads API. Can it be not in the code, but in the account settings?

My PHP Class Code:

class CheckController extends AbstractController
{

public function index()
{
$config = $this->getParameter('kernel.project_dir') . '/google_ads_php.ini';

if (!is_file($config)) return $this->json([$config]);

$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile()
->build();
//dd($oAuth2Credential);
$googleAdsClient = (new GoogleAdsClientBuilder())
->fromFile()
->withOAuth2Credential($oAuth2Credential)
->build();

try {
self::runExample(
$googleAdsClient,
xx
);
} catch (GoogleAdsException $googleAdsException) {
printf(
"Request with ID '%s' has failed.%sGoogle Ads failure details:%s",
$googleAdsException->getRequestId(),
PHP_EOL,
PHP_EOL
);
foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) 
{
/** @var GoogleAdsError $error */
printf(
"\t%s: %s%s",
$error->getErrorCode()->getErrorCode(),
$error->getMessage(),
PHP_EOL
);
}
exit(1);
} catch (ApiException $apiException) {
printf(
"ApiException was thrown with message '%s'.%s",
$apiException->getMessage(),
PHP_EOL
);
exit(1);
}
}

/**
* @param GoogleAdsClient $googleAdsClient
* @param int $customerId
* @return void
* @throws ApiException
*/
public static function runExample(GoogleAdsClient $googleAdsClient, int 
$customerId)
{
$googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();
// Creates a query that retrieves all campaigns.
$query = 'SELECT campaign.id, campaign.name FROM campaign ORDER BY 
campaign.id';
// Issues a search stream request.
/** @var GoogleAdsServerStreamDecorator $stream */
$stream =
$googleAdsServiceClient->searchStream($customerId, $query);

// Iterates over all rows in all messages and prints the requested field 
values for
// the campaign in each row.
foreach ($stream->iterateAllElements() as $googleAdsRow) {
/** @var GoogleAdsRow $googleAdsRow */
printf(
"Campaign with ID %d and name '%s' was found.%s",
$googleAdsRow->getCampaign()->getId(),
$googleAdsRow->getCampaign()->getName(),
PHP_EOL
);
}
}

public static function runListExample(GoogleAdsClient $googleAdsClient)
{
$customerServiceClient = $googleAdsClient->getCustomerServiceClient();

// Issues a request for listing all accessible customers.
$accessibleCustomers = $customerServiceClient->listAccessibleCustomers();
print 'Total results: ' . count($accessibleCustomers->getResourceNames()) . 
PHP_EOL;

// Iterates over all accessible customers' resource names and prints them.
foreach ($accessibleCustomers->getResourceNames() as $resourceName) {
/** @var string $resourceName */
printf("Customer resource name: '%s'%s", $resourceName, PHP_EOL);
}
}
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/d3f373d8-02bd-4a49-830f-0bb5674274f8n%40googlegroups.com.


Not result with example getCampaign in google-ads-php

2022-03-09 Thread Vladimir Hiuk


I'm trying to get a list of all campaigns using the Google Ads API. To do 
this, I use an example from the google-ads-php library, but this code does 
not work for me. What's weird is that the foreach loop doesn't even run and 
I don't see the output of var_dump. Can anyone suggest me what I'm doing 
wrong? Or give a link to an example with working code?

My PHP Symfony class code:


class CheckController extends AbstractController
{

public function index()
{
$config = $this->getParameter('kernel.project_dir') . '/google_ads_php.ini';

if (!is_file($config)) return $this->json([$config]);

$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile()
->build();
//dd($oAuth2Credential);
$googleAdsClient = (new GoogleAdsClientBuilder())
->fromFile()
->withOAuth2Credential($oAuth2Credential)
->build();

try {
self::runExample(
$googleAdsClient,
xx
);
} catch (GoogleAdsException $googleAdsException) {
printf(
"Request with ID '%s' has failed.%sGoogle Ads failure details:%s",
$googleAdsException->getRequestId(),
PHP_EOL,
PHP_EOL
);
foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) 
{
/** @var GoogleAdsError $error */
printf(
"\t%s: %s%s",
$error->getErrorCode()->getErrorCode(),
$error->getMessage(),
PHP_EOL
);
}
exit(1);
} catch (ApiException $apiException) {
printf(
"ApiException was thrown with message '%s'.%s",
$apiException->getMessage(),
PHP_EOL
);
exit(1);
}
}

/**
* @param GoogleAdsClient $googleAdsClient
* @param int $customerId
* @return void
* @throws ApiException
*/
public static function runExample(GoogleAdsClient $googleAdsClient, int 
$customerId)
{
$googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();
// Creates a query that retrieves all campaigns.
$query = 'SELECT campaign.id, campaign.name FROM campaign ORDER BY 
campaign.id';
// Issues a search stream request.
/** @var GoogleAdsServerStreamDecorator $stream */
$stream =
$googleAdsServiceClient->searchStream($customerId, $query);

// Iterates over all rows in all messages and prints the requested field 
values for
// the campaign in each row.
foreach ($stream->iterateAllElements() as $googleAdsRow) {
/** @var GoogleAdsRow $googleAdsRow */
printf(
"Campaign with ID %d and name '%s' was found.%s",
$googleAdsRow->getCampaign()->getId(),
$googleAdsRow->getCampaign()->getName(),
PHP_EOL
);
}
}

public static function runListExample(GoogleAdsClient $googleAdsClient)
{
$customerServiceClient = $googleAdsClient->getCustomerServiceClient();

// Issues a request for listing all accessible customers.
$accessibleCustomers = $customerServiceClient->listAccessibleCustomers();
print 'Total results: ' . count($accessibleCustomers->getResourceNames()) . 
PHP_EOL;

// Iterates over all accessible customers' resource names and prints them.
foreach ($accessibleCustomers->getResourceNames() as $resourceName) {
/** @var string $resourceName */
printf("Customer resource name: '%s'%s", $resourceName, PHP_EOL);
}
}
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/4e21dc38-9bd1-4a23-89a6-ea384c6aa0d0n%40googlegroups.com.


Re: Retrieve each campaigns geographic target

2022-03-09 Thread scratch27
Hi Darwin,

Thank you for you reply!

I'm sorry I can't figure out how to get for each campaign the targeted 
country location.

I select the campaign.name and the geographic_view.country_criterion_id 
from the geographic.view
But when I echo the country criterion Id in php I have int(2250) but this 
does not correspond to a country ID inthe ISO format

Could you specify how to get campaign name and associated targeted or 
excluded country please?

Thank you so much!

Le mercredi 9 mars 2022 à 06:06:31 UTC+1, adsapi a écrit :

> Hi Scratch,
>  
>
> Thanks for reaching out to the Google Ads API Support team.
>  
>
> Let me assist you in this concern, The Google Ads Query Language (GAQL) 
> can query the Google Ads API for resources and their related attributes, 
> segments, and metrics, also Google Ads Query Language queries demonstrate 
> how to return the same data as screens in the Google Ads UI.
>
>
> You can see the use of GAQL query in this documentation check this *link* 
> 
>  for 
> your references. To specifically answer your question, you can add the 
> campaign.name 
> 
>  in 
> the geographic_view 
> 
>  report.
>
>
> Let us know if you have any questions.
>
>
> Regards,
> [image: Google Logo] 
> Darwin 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2XmRLE: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/8f34913f-a686-4664-8d91-c84b117c9a0an%40googlegroups.com.