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.<p>Please try again in 30 seconds.

I can not figure out what is wrong.

a/ in cycle

campaign_id = 000000000
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 => 10000000
        }
      },
      :keyword_content_max_cpc => {:amount => {:micro_amount => 2000000}}
    },
    :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.


Reply via email to