Google Ads API: How to identify ENUM data type?

2019-04-18 Thread Alexander Belozerov

Hello there,
What is the best way to identify the data type that is shown as ENUM when 
getting a response from this method in python library:

search_google_ads_fields

I was assuming that it is always "string" but just run into an example 
where it is a string for one customer id and an integer for another.

Examples are
 advertising_channel_sub_type, advertising_channel_sub_type

both can be a string as "DISPLAY_GMAIL_AD" and an integer as 7.

I need to save this data in one place for reporting purposes.
My question are:
How can i get the data type for ENUM?
 and why is it different for the same fields in different accounts?

Thanks,
Alex

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6411e8c7-0f3e-41ae-a2cc-1344a21f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Google Ads: 504 Deadline Exceeded

2019-04-15 Thread Alexander Belozerov

Hi there,
Im getting 504 Deadline Exceeded when running following query using python 
library:

'SELECT name, data_type, is_repeated'


I wonder if the problem is that im querying a huge account with 3million 
ads? And if so what is the best way to fix this?
This same query works just fine with smaller accounts.

Thanks,
Alex

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/496f7ae5-db86-4dbf-a472-c6ff8a366834%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the best way to get list of non-mcc accounts?

2019-04-05 Thread Alexander Belozerov
Hi Dannison,
Thank you for your message,
Could you please help with the query?

When i do something like this with my master MCC:
'SELECT customer_client.client_customer, customer.manager FROM 
customer_client'

I get customer.manager = true for all accounts. So this particular query 
doesn't solve the issue. But i wonder if you meant to use customer.manager 
in some other way?


Thanks,
Alex





On Friday, 5 April 2019 03:12:17 UTC+1, googleadsapi-forumadvisor wrote:
>
> Hi Alex,
>
> You could use a filter for the field customer.manager 
> 
>  
> and set this to *FALSE* to return only client accounts in your query. Let 
> me know if this helps.
>
> Regards,
> Dannison
> Google Ads API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> https://ads-developers.googleblog.com/search/label/google_ads_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking 
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey 
> 
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> On 04/04/19 22:29:58 dju...@gmail.com  wrote:
>
> Hello there,
> Ive got a tree-like mcc structure, such as that mcc of multiple levels on 
> top of each other.
>
> What is the best way to get a list of non-mcc customer ids in order to be 
> able to query stats for them (it is not possible to query for mcc account)?
>
>
> This code return all accounts under master mcc including mcc:
> query = SELECT customer_client.client_customer FROM customer_client
> response = ga_service.search(customer_id = MASTER_MCC, query = query)
>
> I wonder what is the best way to get non-mcc accounts on all levels?
>
> Thanks,
> Alex
>
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/b579b039-4785-404c-909e-251d5ae755a4%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5bf7c98f-114c-45b0-8b7a-9b78f3bfd51c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What is the best way to get list of non-mcc accounts?

2019-04-04 Thread Alexander Belozerov
Hello there,
Ive got a tree-like mcc structure, such as that mcc of multiple levels on 
top of each other.

What is the best way to get a list of non-mcc customer ids in order to be 
able to query stats for them (it is not possible to query for mcc account)?


This code return all accounts under master mcc including mcc:
query = SELECT customer_client.client_customer FROM customer_client
response = ga_service.search(customer_id = MASTER_MCC, query = query)

I wonder what is the best way to get non-mcc accounts on all levels?

Thanks,
Alex

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b579b039-4785-404c-909e-251d5ae755a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migration to Google Ads API - Get list of all accounts under MCC

2019-04-04 Thread Alexander Belozerov
Hi there,
Im having similar issue,
this would get me list of all accounts, including mcc.

For example if we have tree-like structure with master MCC and multiple 
level MCCs under it, what would be the best way to get a list of all 
non MCC account under master MCC?
This is in order to collect reporting data for all our accounts.

Thanks,
Alex



On Wednesday, 3 April 2019 21:26:36 UTC+1, googleadsapi-forumadvisor wrote:
>
> Hi Marcel,
>
> You can try using the GoogleAdsService 
> 
>  and 
> set the query to the one that I provided earlier. You can find a similar 
> API call here 
> 
> .
>
> Regards,
> Anthony
> Google Ads API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> https://ads-developers.googleblog.com/search/label/google_ads_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> On 04/03/19 12:21:39 marce...@d1-solutions.com  wrote:
>
> Hi Anthony
>
> Thanks for getting back. I've tried the CustomerClientService with Python
>
> service = client.get_service('CustomerClientService')
> query = ('SELECT customer_client.resource_name,'
> 'customer_client.client_customer,'
> 'customer_client.level, customer_client.hidden,'
> 'customer_client.level'
> 'FROM customer_client');
> response = service.search(root_account_id, query=query, page_size=100)
>
> Where root_account_id is the ID of the root level MCC account. But I get
>
> AttributeError: 'CustomerClientServiceClient' object has no attribute 
> 'search'
>
> Is this the right service? If not, what service should be used?
>
> Regards Marcel
>
> On Monday, 1 April 2019 23:24:05 UTC+2, googleadsapi-forumadvisor wrote:
>
> Hi Marcel,
>
> To get the account hierarchy via Google Ads API, you could use the 
> customer_client 
>  
> resource. 
> Through which you can get only the resource name, level, Boolean value of 
> hidden status and Client_customer details of the accounts under your 
> manager account. To get these details the OAuth credentials used to make 
> the API call should be of manager account and the ClientCustomerId passing 
> in the header should be of manager account. Below is the sample query for 
> your reference. 
>
> Please note that, you have to iterate through all the customers to get the 
> descriptive_name.
>
> query = ('SELECT customer_client.resource_name,
> customer_client.client_customer,
> customer_client.level, customer_client.hidden,
> customer_client.level
> FROM customer_client');
>
> Please let me know if you have any further questions.
>
> Regards,
> Anthony
> Google Ads API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> https://ads-developers.googleblog.com/search/label/google_ads_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> On 04/01/19 10:55:22 marce...@d1-solutions.com wrote:
>
> Hi
>
> We're in the process of migrating from AdWords API to the new Google Ads 
> API. Our Python tool currently loops over all accounts under the MCC root 
> account and downloads various reports for all accounts on a daily basis.
>
> From what I understand, we also have to place calls for each account again 
> with the Google Ads API. Therefore, we also need to know all accounts under 
> the root level MCC account, but I'm already struggling with this.
>
> In the AdWords API we would do something like this: I would use 
> ManagedCustomerService.get(selector) with an appropriate selector and 
> then loop over the pages (see also here 
> )
>  
> to get all accounts under the root MCC.
>
> How would I do this with the new Google Ads API? The Python examples 
>  do not (yet) show how 
> to do this. Or is there a better way to pull reports over all accounts, 
> which are not managed accounts?
>
> FYI: Credentials & token are working (we're using the same tokens as 
> before for AdWords [see here 
> ]) 
> and I can successfully pull the accessible customers 
> via customer_service.list_accessible_customers().
>
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog:
> https://googleadsdeveloper.blogspot.com/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>  
> You received this message because you are subscri

How to convert Google-Ads API GoogleAdsRow to json?

2019-04-01 Thread Alexander Belozerov
Hello there,
Im querying google ads api and need to save results as json. What is the 
best way to convert GoogleAdsRow type into json?


The result of the google ads api call is GoogleAdsRow that looks like this:

campaign {
  resource_name: "customers/321/campaigns/123"
  id {
value: 123
  }
  name {
value: "Campaign Name A"
  }
}
metrics {
  clicks {
value: 711
  }
  impressions {
value: 2662
  }
}
segments {
  device: DESKTOP
  ad_network_type: SEARCH
  date {
value: "2019-03-01"
  }
}

Instead of campaign, it can be adgroup, keywords, etc.
What is the best way to convert this kind of data to json?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/36dfac7b-4885-4aac-9833-97c17517f9c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Basic Adwords API codding needed

2013-10-11 Thread Alexander Belozerov
Hi there 
I'm looking for someone to code a basic script for editing Google Adwords 
campaign using API.

Here are some functions script is expected to do:
1) Authorisation
2) Get data about campaign, ad groups, ads, keywords, bids, bid 
recommendations and show them
3) Get data about current spending and show it
4) Create campaigns, ad groups, ads, keywords
5) Edit ad groups and keywords
6) Set bids for keywords

Would you be interested, please, get in touch.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.