Posts under category google-ads-api

i started working on existing react native projet, that have Google ads which is already working on the playStore.

However,is not working on dev environment, is this is normal ? Does the Google ads works only after uploading the app on the store ?

I've been trying to get the results from the bid simulator in Google ads via the API but have not been successful. I have tried to follow the steps outlined by google in these guides:

https://support.google.com/google-ads/answer/9634060?hl=en https://developers.google.com/adwords/api/docs/guides/bid-landscapes#python_3

I have very slightly modified the code and it does run:

from googleads import adwords CAMPAIGN_ID = '---------' PAGE_SIZE = 100 def main(client, campaign_id):     # Initialize appropriate service.     data_service = client.GetService('DataService', version='v201809')     # Get all the campaigns for this account.     selector = {         'fields': ['CampaignId', 'CriterionId', 'StartDate', 'EndDate',                    'BidModifier', 'LocalClicks', 'LocalCost', 'LocalImpressions',                    'TotalLocalClicks', 'TotalLocalCost', 'TotalLocalImpressions',                    'RequiredBudget'],         'paging': {             'startIndex': 0,             'numberResults': PAGE_SIZE         },         'predicates': [{             'field': 'CampaignId', 'operator': 'IN', 'values': [campaign_id]         }]     }     # Set initial values.     offset = 0     more_pages = True     while more_pages is True:         num_landscape_points = 0         page = data_service.getCampaignCriterionBidLandscape(selector)         # Display results.         if 'entries' in page:             for bid_modifier_landscape in page['entries']:                 num_landscape_points = 0             print(f'Found campaign-level criterion bid modifier landscapes for '                   f"criterion with ID {bid_modifier_landscape['criterionId']},"                   f" start date {bid_modifier_landscape['startDate']}, end date     {bid_modifier_landscape['endDate']},"                   f" and landscape points:")             for landscape_point in bid_modifier_landscape['landscapePoints']:                 num_landscape_points += 1                 print(f"\tbid modifier: {landscape_point['bidModifier']},"                       f" clicks: {landscape_point['clicks']},"                       f" cost: {landscape_point['cost']['microAmount']},"                       f" impressions: {landscape_point['impressions']},"                       f"total clicks: {landscape_point['totalLocalClicks']},"                       f" total cost: {landscape_point['totalLocalCost']['microAmount']},"                       f" total impressions: {landscape_point['totalLocalImpressions']},"                       f"and required budget: {landscape_point['requiredBudget']['microAmount']}")         else:             print('No bid modifier landscapes found.')         # Need to increment by the total # of landscape points within the page,         # NOT the number of entries (bid landscapes) in the page.         offset += num_landscape_points         selector['paging']['startIndex'] = str(offset)         more_pages = num_landscape_points >= PAGE_SIZE if __name__ == '__main__':     # Initialize client object.     adwords_client = adwords.AdWordsClient.LoadFromStorage()     main(adwords_client, CAMPAIGN_ID) 

This does not however let me get the predicted conversion value, only the clicks and impressions etc which is not really what I am looking for. This seems to line up with the documentation but in the GUI I can get conversion value but seemingly no matter what key I try to query for the API won't let me get the same simulator output as in the GUI.

Any thoughts?

I downloaded Xcode12 beta 5 to apply Google Ads SDK v7.64 and AppTrackingTransparency framework to my app. But when I build my project with Xcode12 beta 5, I meet "library not found for -lGoogleUtilities" even though I didn't change my project file anything. When I use Xcode11 to build my project, it's okay.

Is it a bug of Xcode12? Or How can I fix the problem?

I use pod to setting and opened *.xcworkspace file to open project.

I want to download app campaign report using python, The code is working with App reports but not for App engagement campaigns please help

report_downloader = adwords_client.GetReportDownloader(version='v201809')

      # Create report query.       report_query = (adwords.ReportQueryBuilder()                          .Select('CampaignId','CampaignName','CampaignStatus','CustomerDescriptiveName','AccountDescriptiveName','Date','DayOfWeek','Cost','Impressions','Clicks','Interactions','Engagements','TopImpressionPercentage','AbsoluteTopImpressionPercentage','Conversions')                       .From('CAMPAIGN_PERFORMANCE_REPORT')                       .During('YESTERDAY')                       .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, skip_report_header=True,           skip_column_header=True, skip_report_summary=True,           include_zero_impressions=True)       output.seek(0) 

I want to propose a budget for an ads account under my manager account. I have the following YAML file:

developer_token: 13245 login-customer-id: 1324567891 customer-id: 1324567891 user_agent:  13245 client_id: 13245 client_secret: 13245 refresh_token: 13245 

When i try to run my script, i get this error:

Error with message

"User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header.

This is the code that i use, from the example python library:

    try:     account_budget_proposal_response = (       account_budget_proposal_service.mutate_account_budget_proposal(           customer_id, account_budget_proposal_operation))