Posts under category Google

I entered roughly 800 keywords in Keyword Planner for two target locations:

  • San Antonio TX, Texas, United States
  • San Jose, California, United States

The summary data for the Historical Metrics result set by Location is as follows:

I then added 18 more locations to the same keyword list to create this list of target locations.

  • Ann Arbor, Michigan, United States
  • Austin TX, Texas, United States Nielsen® DMA® regions
  • Cambridge, Massachusetts, United States
  • Cincinnati OH, United States Nielsen® DMA® regions
  • Columbia SC, South Carolina, United States Nielsen® DMA® regions
  • Fort Worth, Texas, United States
  • Greenville-Spartanburg-Asheville-Anderson, United States Nielsen® DMA® regions
  • Indianapolis IN, Indiana, United States Nielsen® DMA® regions
  • Jacksonville FL, United States Nielsen® DMA® regions
  • Miami, Florida, United States
  • New Haven County, Connecticut, United States county
  • Oakland, California, United States city
  • Orlando, Florida, United States city
  • Richmond-Petersburg VA, Virginia, United States Nielsen® DMA® regions
  • Salt Lake City UT, United States Nielsen® DMA® regions
  • San Antonio TX, Texas, United States Nielsen® DMA® regions
  • San Jose, California, United States
  • Syracuse NY, New York, United States Nielsen® DMA® regions
  • Trenton, New Jersey, United States city
  • Warsaw, Indiana, United States city

The summary data for this Historical Metrics result set by Location is as follows:

How does this make sense? Why would San Antonio disappear from the list? Why would the volume for San Jose go down?

Google Ads API, Their new version of the Google Adwords API returns data in a format called "GoogleAdsRow". I have not found any use at all for the information to be presented in this format and it is quite confusing. I want to print my file to a basic .csv format, but there is not any type of delimiter as far as i can tell. S far I have only been able to print each entire row as a single cell. Not Helpful :-).

My main function looks like this following. I have provided two examples of what I have tried with a comment block identifying both attempts:

def main(client, customer_id, page_size):     ga_service = client.get_service('GoogleAdsService', version='v2')     query = ('SELECT ad_group.id, ad_group_criterion.type, '              'ad_group_criterion.criterion_id, '              'ad_group_criterion.keyword.text, '              'ad_group_criterion.keyword.match_type FROM ad_group_criterion '              'WHERE ad_group_criterion.type = KEYWORD')     results = ga_service.search(customer_id, query=query, page_size=page_size)     try:         with open(path, "w", encoding = "utf-8", newline = "") as f:         #with open(path, "w") as csv:             csv_writer = csv.writer(f, delimiter=',')             for row in results:                 campaign = row.campaign                            csv_writer.writerow([row]) #Prints entire returned row as a single cell                 csv_writer.writerow(row) #Tells me there is no delimiter 

The iterable error is as follows

<ipython-input-15-e736ee2d05c9> in main(client, customer_id, page_size)      17                 campaign = row.campaign      18                 #csv_writer.writerow([row]) #Prints entire returned row as a single cell ---> 19                 csv_writer.writerow(row) #Tells me there is no delimiter      20       21  Error: iterable expected, not GoogleAdsRow 

I am new to Google AdWords API.

Right now I am downloading the AD_PERFORMANCE_REPORT and I want to segment it by day, but I cant find the right example in their documentation

My code looks like this:

 def get_data(customer_id):     df = None     for item in customer_id:         report_query = (adwords.ReportQueryBuilder()                         .Select('AdGroupId', 'AdGroupName', 'AbsoluteTopImpressionPercentage', 'Impressions', 'Conversions')                         .From('AD_PERFORMANCE_REPORT')                         .During('LAST_7_DAYS')                         .Build())         # You can provide a file object to write the output to. For this         # demonstration we use sys.stdout to write the report to the screen.         report_downloader.DownloadReportWithAwql(             report_query,             'CSV',             output,             client_customer_id=item,  # denotes which adw account to pull from             skip_report_header=True,             skip_column_header=False,             skip_report_summary=True,             include_zero_impressions=False)         output.seek(0)         df = pd.read_csv(output)         if df is None:             df = pd.DataFrame(output)         else:             df = df.append(pd.DataFrame(output))     return df 

Thank you for your suggestions.

I am building an application that is using Google Adwords API. I am asking the user to sign in with his Google Account and grant me permission to use his adwords Accounts. When the user logs in with Google, I am getting his accounts using googleads.adwords

from googleads import oauth2, adwords client = adwords.AdWordsClient(developer_token, oauth2_client, 'test') offline_conversion_feed_service = client.GetService('CustomerService', version='v201809') customers = offline_conversion_feed_service.getCustomers() 

I need to find all the MCC accounts and their linked accounts.

In customers I have all the accounts and their client_customer_id, but I cannot determine which account is linked with which MCC.

My question is, how to determine which accounts are linked with which ?