How add YouTube video to UAC campaign programmatically?

2020-01-22 Thread Sama Ra
I have UAC campaign and YouTube video.
I wanna to add this video to campaign.
Is there is a way to do it programmatically?
I see that i need AssetId of this video (YouTubeVideoAsset), but hot to 
retrieve it for a given YouTube video?
Thanks in advance

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

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


Getting MISSING_MULTIPLE_MOBILE_APP_SETTING while creating Universal App campaign

2019-08-15 Thread Sama Ra
While creating universal app campaign with following parameters:

{
"operator": "ADD",
"xsi_type": "CampaignOperation",
"operand": {
"name": "XXX",
"status": "ENABLED",
"budget": {
"budget_id": XXX
},
"bidding_strategy_configuration": {
"bidding_strategy_type": "TARGET_CPA",
"bidding_scheme": {
"xsi_type": "TargetCpaBiddingScheme",
"target_cpa": {
"micro_amount": XXX
}
}
},
"advertising_channel_type": "MULTI_CHANNEL",
"advertising_channel_sub_type": "UNIVERSAL_APP_CAMPAIGN",
"settings": [{
"xsi_type": "GeoTargetTypeSetting",
"positive_geo_target_type": "DONT_CARE",
"negative_geo_target_type": "DONT_CARE"
}],
"universal_app_campaign_info": {
"bidding_strategy_goal_type": "OPTIMIZE_FOR_INSTALL_CONVERSION_VOLUME",
"app_id": "XXX",
"app_vendor": "VENDOR_GOOGLE_MARKET"
}
}
}


i get:

AdwordsApi::V201809::CampaignService::ApiException - 
[CampaignError.MISSING_MULTIPLE_MOBILE_APP_SETTING @ 
operations[0].operand.settings]


Few days before i could run campaign but now not.
These error is not documented neither i can find any info about it anywhere.

Need your help

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

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


Re: Problem with updating UniversalAppCampaignSetting

2019-06-28 Thread Sama Ra
Need to use youtube_video_media_ids_ops and youtube_video_media_ids 
attribute names

On Friday, June 28, 2019 at 12:12:13 AM UTC+3, Sama Ra wrote:
>
> Thank you a lot for reponse and hello again!
>
> According to your answer my first assumption was right - to manage this 
> via CampaignService by mutating UniversalAppSetting. That works for text 
> assets but does not for video medias:
>
> srv = adwords.service(:CampaignService, :v201809)
>
> srv.mutate([
>   { 
> operator: 'SET',
> operand: {
>   id: XXX,
>   settings: [
> {
>   xsi_type: 'UniversalAppCampaignSetting',
>
>   # This works! :)
>   description1: 'lalala',
>
>   # Bit this doesn't :(
>   # youtubeVideoMediaIds: [YYY],
>   # youtubeVideoMediaIdsOps: ['REMOVE']
> }
>   ]
> }
>   }
> ])
>
> I am using the latest version of ruby client for your 
> API: google-adwords-api (1.5.0)
> Is that issue related to my misunderstanding or to ruby liblary?
> Hope we will fight this problem together!
>
> On Thursday, June 27, 2019 at 6:42:45 PM UTC+3, adsapiforumadvisor wrote:
>>
>> Hello Sama, 
>>
>> Thank you for clarifying this. The AdWords API currently does not support 
>> creating new YoutubeVideoMedia, so you need to manually set the campaign's 
>> YouTube Video assets through the AdWords UI. If you already have existing 
>> youtube media in your account, you will be able to use 
>> CampaignService.mutate() to add new settings to the campaign. You will need 
>> to do a MediaService.get() 
>> <https://developers.google.com/adwords/api/docs/reference/v201806/MediaService#get>
>>  to 
>> get the specific youtube media Id and then use the UniversalAppSetting 
>> <https://developers.google.com/adwords/api/docs/reference/v201806/CampaignService.UniversalAppCampaignSetting>
>>  to 
>> add the new media setting to the campaign. Please find the code snippet 
>> below as a reference:
>>
>> UniversalAppCampaignSetting universalAppSetting = new 
>> UniversalAppCampaignSetting(); 
>> universalAppSetting.setYoutubeVideoMediaIds(new long[] {4390676349L}); 
>> campaign.setSettings(new Setting[] {universalAppSetting});
>>
>> CampaignOperation operation = new CampaignOperation();
>> operation.setOperand(campaign);
>> operation.setOperator(Operator.SET);
>>
>> Let me know if you have any other questions. 
>>
>> Thanks,
>> Bharani, Google Ads API Team
>>
>> ref:_00D1U1174p._5001UCZBhj:ref
>
>

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

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


Re: Problem with updating UniversalAppCampaignSetting

2019-06-27 Thread Sama Ra
Thank you a lot for reponse and hello again!

According to your answer my first assumption was right - to manage this via 
CampaignService by mutating UniversalAppSetting. That works for text assets 
but does not for video medias:

srv = adwords.service(:CampaignService, :v201809)

srv.mutate([
  { 
operator: 'SET',
operand: {
  id: XXX,
  settings: [
{
  xsi_type: 'UniversalAppCampaignSetting',

  # This works! :)
  description1: 'lalala',

  # Bit this doesn't :(
  # youtubeVideoMediaIds: [YYY],
  # youtubeVideoMediaIdsOps: ['REMOVE']
}
  ]
}
  }
])

I am using the latest version of ruby client for your 
API: google-adwords-api (1.5.0)
Is that issue related to my misunderstanding or to ruby liblary?
Hope we will fight this problem together!

On Thursday, June 27, 2019 at 6:42:45 PM UTC+3, adsapiforumadvisor wrote:
>
> Hello Sama, 
>
> Thank you for clarifying this. The AdWords API currently does not support 
> creating new YoutubeVideoMedia, so you need to manually set the campaign's 
> YouTube Video assets through the AdWords UI. If you already have existing 
> youtube media in your account, you will be able to use 
> CampaignService.mutate() to add new settings to the campaign. You will need 
> to do a MediaService.get() 
> 
>  to 
> get the specific youtube media Id and then use the UniversalAppSetting 
> 
>  to 
> add the new media setting to the campaign. Please find the code snippet 
> below as a reference:
>
> UniversalAppCampaignSetting universalAppSetting = new 
> UniversalAppCampaignSetting(); 
> universalAppSetting.setYoutubeVideoMediaIds(new long[] {4390676349L}); 
> campaign.setSettings(new Setting[] {universalAppSetting});
>
> CampaignOperation operation = new CampaignOperation();
> operation.setOperand(campaign);
> operation.setOperator(Operator.SET);
>
> Let me know if you have any other questions. 
>
> Thanks,
> Bharani, Google Ads API Team
>
> ref:_00D1U1174p._5001UCZBhj:ref

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

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


How to retrieve ALL ConversionTracker ids via ConversionTracker service?

2019-06-26 Thread Sama Ra
Good day!

Here is my code to retrieve conversion tracker ids:

adwords = Adwords.get_api_client(customer_id)
srv = adwords.service(:ConversionTrackerService, :v201809)

items = []
page_size = 500

query_builder = adwords.service_query_builder do |b|
  b.select('Id', 'Name')
  b.limit(0, page_size)
end
query = query_builder.build

loop do
  page_query = query.to_s
  page = srv.query(page_query)
  if page and page[:entries]
items += page[:entries]
  end
  break unless query.has_next(page)
  query.next_page
end
items

It does not return some of conversion tracker id which i can see in Adwords 
UI:


[image: Screen Shot 2019-06-26 at 12.34.15 PM.png] 





Is there any workaround?

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

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


Re: Problem with updating UniversalAppCampaignSetting

2019-06-26 Thread Sama Ra
Good day, Bharani!

Thank you for your response! It was very helpful but unfortunately i have 
not achieved my goal (manage universal app ad videos). Here is key point of 
my researches:

- Google changes it's API and UniversalAppCampaignSetting won't be used to 
contain ad specific information
- To reach particular Ad i should use AdGroupAdService or AdService
- I have not succeed in managing videos of YouTubeVideoAsset 
of UniversalAppAd. Please have a look at my code snippet:

adwords = Adwords.get_api_client(customer_id)
srv = adwords.service(:AdService, :v201809)

srv.mutate([
  {
operator: 'SET',
operand: {
  id: ad_id,
  xsi_type: 'UniversalAppAd',
  videos: [
{
  asset: { 
xsi_type: 'YouTubeVideoAsset',
assetName: 'TEST',
assetSubtype: 'YOUTUBE_VIDEO',
youTubeVideoId: 'kEVdywAtk50'
  }
}
  ]
}
  }
])

which produces error:

/usr/local/bundle/gems/google-ads-common-1.0.2/lib/ads_common/parameters_validator.rb:156:in
 
`check_extra_fields': AdsCommon::Errors::UnexpectedParametersError: 
[:assetName, :assetSubtype, :youTubeVideoId] 
(AdsCommon::Errors::UnexpectedParametersError)

My next step is to investigate AppAdInfo.

Any help is highly appreciated. Thank you in advance!

On Monday, June 24, 2019 at 11:40:29 PM UTC+3, adsapiforumadvisor wrote:
>
> Hi Sama, 
>
> Could you please check if you are making these changes to the test 
> accounts? If so, you will need to use the UniversalAppCampaignInfo 
> 
>  in 
> the CampaignService. You will no longer use a UniversalAppCampaignSetting 
> ,
>  
> which includes both information about the app and references to media and 
> descriptions that would be used for ads in that campaign. Please refer to 
> this 
> blog post 
>  for 
> more information. If you are updating the campaign in a production account, 
> could you please share the request and response logs which includes the 
> complete error logs to check this further? You may share the details 
> privately via Reply privately to author option.
>
> Thanks,
> Bharani, Google Ads API Team
>
> ref:_00D1U1174p._5001UCZBhj:ref

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

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


Problem with updating UniversalAppCampaignSetting

2019-06-24 Thread Sama Ra
I wanna to mange videos for my universal app campaign. Here is the code:

adwords = Adwords.get_api_client(XXX)
srv = adwords.service(:CampaignService, :v201809)
srv.mutate([
  { 
operator: 'SET',
operand: { 
  id: XXX,
  settings: [
{
  xsi_type: 'UniversalAppCampaignSetting',
  settingType: 'UniversalAppCampaignSetting',
  youtubeVideoMediaIds: [YYY],
  youtubeVideoMediaIdsOps: ['REMOVE']
}
  ]
}
  }
])

which faults with:

/usr/local/bundle/gems/google-ads-common-1.0.2/lib/ads_common/parameters_validator.rb:156:in
 
`check_extra_fields': AdsCommon::Errors::UnexpectedParametersError: 
[:settingType, :youtubeVideoMediaIds, :youtubeVideoMediaIdsOps] 
(AdsCommon::Errors::UnexpectedParametersError)

Whats wrong? Need your assistance because of lack of documentation / code 
samples

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

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