Re: Examples - add_keywords_in_bulk() message Operation - FAILED
I checked AdGroupID. The error was this ID. 112911549 is because the value CampaignID. No comment Thank you for your message Achil Dne pondělí, 15. dubna 2013 8:46:17 UTC+2 achil napsal(a): > > I tested the script: > > .../ > google-adwords-api-0.7.2/examples/v201209/campaign_management/add_keywords_in_bulk.rb > > I have set only > > ad_group_id = 112911549. > > but something is not right. The terminal returns the answer: > > Job ID 744145239409395485 was successfully created. > Retrieving job status... > [0] Job finished with status 'COMPLETED' > Operation [0] - FAILED > Operation [1] - FAILED > ... > Operation [98] - FAILED > Operation [99] - FAILED > Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: > 'operations[0].operand.adGroupId' > Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: > 'operations[1].operand.adGroupId' > ... > Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: > 'operations[98].operand.adGroupId' > Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: > 'operations[99].operand.adGroupId' > > michal@michal-ubuntu:/usr/lib/ruby/gems/1.9.1/gems/google-adwords-api-0.7.2/examples/v201209/campaign_management$ > > Where can it be wrong? > > Thank you for the advice. > > Achil > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Examples - add_keywords_in_bulk() message Operation - FAILED
I tested the script: .../ google-adwords-api-0.7.2/examples/v201209/campaign_management/add_keywords_in_bulk.rb I have set only ad_group_id = 112911549. but something is not right. The terminal returns the answer: Job ID 744145239409395485 was successfully created. Retrieving job status... [0] Job finished with status 'COMPLETED' Operation [0] - FAILED Operation [1] - FAILED ... Operation [98] - FAILED Operation [99] - FAILED Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: 'operations[0].operand.adGroupId' Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: 'operations[1].operand.adGroupId' ... Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: 'operations[98].operand.adGroupId' Error, reason: 'INVALID_ID', trigger: 'AdGroupId: 112911549', field path: 'operations[99].operand.adGroupId' michal@michal-ubuntu:/usr/lib/ruby/gems/1.9.1/gems/google-adwords-api-0.7.2/examples/v201209/campaign_management$ Where can it be wrong? Thank you for the advice. Achil -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Operations - preparing in the cycle
Resolved: place this code: ad_groups = Array.new idx = 0 array_xml.each do |arr| ad_groups << { ... } idx += 1 end I used this: ad_groups = Array.new idx = 0 array_xml.each do |arr| arr_tmp = { ... } ad_groups << arr_tmp idx += 1 end Michal Dne středa, 20. března 2013 21:01:40 UTC+1 achil napsal(a): > > > I have a question for inserting ad groups. Please advice. I do not know if > I proceed correctly? I can not insert more ad groups. I need to insert more > than 5000 promotional sets. Promo set has one keyword and two text ads. > > Operations - preparing in the cycle. This way I can add a maximum of 22 ad > groups. When I want to create more than 22 ad groups, rubyscript end run > error. > > This way I can add a maximum of 22 ad groups. When I want to create more > than 22 ad groups, rubyscript is terminated by error. > > AdsCommon::Errors::HttpError > HTTP Error occurred: HTTP error (502) > The server encountered a temporary error and could not complete your > request. Please try again in 30 seconds. > > When I create the field manually, they can put more ad groups. But the > number of ads is not constant, so it can not be about used. > > I can not figure out what is wrong. > > a/ in cycle > > campaign_id = 0 > ide = 21 > idx = 0 > > #array_xml.each do |arr| > # (0..21).each do |idx| > ad_groups << { > :name => "%d RS #%d" % [1 + idx, (Time.new.to_f * 1000).to_i], > :status => 'ENABLED', > :campaign_id => campaign_id, > :bids => { > :xsi_type => 'ManualCPCAdGroupBids', > :keyword_max_cpc => { > :amount => { > :micro_amount => 1000 > } > }, > :keyword_content_max_cpc => {:amount => {:micro_amount => 200}} > }, > :settings => [ > { > :xsi_type => 'TargetingSetting', > :details => [ > { > :xsi_type => 'TargetingSettingDetail', > :criterion_type_group => 'PLACEMENT', > :target_all => true > }, > { > :xsi_type => 'TargetingSettingDetail', > :criterion_type_group => 'VERTICAL', > :target_all => false > } > ] > } > ] > } > idx += 1 > break if (idx > ide) > end > > b/ manually prepared > > ad_groups = [ > { > :name => "1 RS #%d" % [(Time.new.to_f * 1000).to_i], > :status => 'ENABLED', > :campaign_id => campaign_id, > ... > }, > { > :name => "2 RS #%d" % [(Time.new.to_f * 1000).to_i], > :status => 'ENABLED', > :campaign_id => campaign_id, > ... > }, > ... > ... > { > :name => "XX RS #%d" % [(Time.new.to_f * 1000).to_i], > :status => 'ENABLED', > :campaign_id => campaign_id, > ... > } > ] > > ruby 1.9.3p0 > client library Ruby v201209 / 7.2 > rubyscripts from examples > > Thank you for any advice -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Ask for the multi operation
in instances of client libraries are operations Mutate (update and detele) and get one for each item id (ad group, keywords, text) made opraci for the specified item ID. That means if I want to change a few items I need to create a few questions and they will call in the cycle. ADD can only put several items simultaneously. I understood this correctly? Or have I overlooked something. Somewhere I read that the limit for a single query is 500 operations, but I can not find it. I need to manage about 5000 ad groups in a campaign. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Operations - preparing in the cycle
Hello, I have a question for inserting ad groups. Please advice. I do not know if I proceed correctly? I can not insert more ad groups. I need to insert more than 5000 ad groups. Ad groups has one keyword and two text ads. Operations - preparing in the cycle. This way I can add a maximum of 22 ad groups. When I create the field manually, they can put more ad groups. But the number of ads is not constant, so it can not be about used. When I want to create more than 22 ad groups, rubyscript of late error: AdsCommon::Errors::HttpError HTTP Error occurred: HTTP error (502): The server encountered a temporary error and could not complete your request.Please try again in 30 seconds. I can not figure out what is wrong. a/ in cycle campaign_id = 0 ide = 21 idx = 0 # array_xml.each do |arr| (0..21).each do |idx| ad_groups << { :name => "%d RS #%d" % [1 + idx, (Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, :bids => { :xsi_type => 'ManualCPCAdGroupBids', :keyword_max_cpc => { :amount => { :micro_amount => 1000 } }, :keyword_content_max_cpc => {:amount => {:micro_amount => 200}} }, :settings => [ { :xsi_type => 'TargetingSetting', :details => [ { :xsi_type => 'TargetingSettingDetail', :criterion_type_group => 'PLACEMENT', :target_all => true }, { :xsi_type => 'TargetingSettingDetail', :criterion_type_group => 'VERTICAL', :target_all => false } ] } ] } idx += 1 break if (idx > ide) end b/ manually prepared ad_groups = [ { :name => "1 RS #%d" % [(Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, ... }, { :name => "2 RS #%d" % [(Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, ... }, ... ... { :name => "XX RS #%d" % [(Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, ... } ] ruby 1.9.3p0 client library Ruby v201209 / 7.2 rubyscripts from examples Thank you for any advice and help -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Multi API queries
I use ruby client library v201209. The examples are the procedures for the operation a get mutate The examples show: a) get operation returns all values in the result for the given ID. I know if campaign_id get operation returns a result, all subordinate Ad Group (ad_grou_id -> keyvords, ad_grou_id -> text ads, etc.) b) Mutate operation with operators ADD works similarly to get, but the data is inserted. I know if campaign_id can insert one or more ad_group. (ad_group_id -> keyvords ...) c) Mutate operation with operators SET and REMOVE allow change only item of ID The first query. I understand these operations correctly something I overlooked something? This means there is a need to create more ad groups, you can do one query. If necessary adjust the multiple items is needed to perform the operation cycle for each ID. Somewhere I read that the limit for the number of operations in a single query is 500, but I can not find the page with this information I need to manage more than 5,000 ad groups. I created a logic to compare the inserted content from xml and the content of ads in AdWords. The output of this logic are three fields 1) the ad group that will be stopped 2) the ad group that will be modified 3) ad groups that are newly created Changes are carried out and stop the cycle for each ad_group_id. It or otherwise not. Creating a new Ad Group performs one query. The question I get all the ad_group_id which are used in the second query to insert keywords or texts, which is also implemented in the cycle for each ad_group_id The second query. Is this procedure correct? There is no effective solution? Sorry for the English. This is a translation of Google Translator. Thank you for your answer. Achil -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Operations - preparing in the cycle
I have a question for inserting ad groups. Please advice. I do not know if I proceed correctly? I can not insert more ad groups. I need to insert more than 5000 promotional sets. Promo set has one keyword and two text ads. Operations - preparing in the cycle. This way I can add a maximum of 22 ad groups. When I want to create more than 22 ad groups, rubyscript end run error. This way I can add a maximum of 22 ad groups. When I want to create more than 22 ad groups, rubyscript is terminated by error. AdsCommon::Errors::HttpError HTTP Error occurred: HTTP error (502) The server encountered a temporary error and could not complete your request. Please try again in 30 seconds. When I create the field manually, they can put more ad groups. But the number of ads is not constant, so it can not be about used. I can not figure out what is wrong. a/ in cycle campaign_id = 0 ide = 21 idx = 0 #array_xml.each do |arr| # (0..21).each do |idx| ad_groups << { :name => "%d RS #%d" % [1 + idx, (Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, :bids => { :xsi_type => 'ManualCPCAdGroupBids', :keyword_max_cpc => { :amount => { :micro_amount => 1000 } }, :keyword_content_max_cpc => {:amount => {:micro_amount => 200}} }, :settings => [ { :xsi_type => 'TargetingSetting', :details => [ { :xsi_type => 'TargetingSettingDetail', :criterion_type_group => 'PLACEMENT', :target_all => true }, { :xsi_type => 'TargetingSettingDetail', :criterion_type_group => 'VERTICAL', :target_all => false } ] } ] } idx += 1 break if (idx > ide) end b/ manually prepared ad_groups = [ { :name => "1 RS #%d" % [(Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, ... }, { :name => "2 RS #%d" % [(Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, ... }, ... ... { :name => "XX RS #%d" % [(Time.new.to_f * 1000).to_i], :status => 'ENABLED', :campaign_id => campaign_id, ... } ] ruby 1.9.3p0 client library Ruby v201209 / 7.2 rubyscripts from examples Thank you for any advice -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.