I am currently migrating from adwords to googleads and i kinda matched the following query:
oauth2_client = oauth2.GoogleRefreshTokenClient(client_id, client_secret, refresh_token)
adwords_client = adwords.AdWordsClient(developer_token, oauth2_client, client_customer_id)
adwords_client.SetClientCustomerId(acct)
report_downloader = adwords_client.GetReportDownloader(version=gk.adwords_version)
report = {
'reportName': 'CAMPAIGN_PERFORMANCE_REPORT',
'dateRangeType': 'LAST_30_DAYS',
'reportType': 'CAMPAIGN_PERFORMANCE_REPORT',
'downloadFormat': 'XML',
'selector': {
'fields': ['Date', 'Device', 'AccountDescriptiveName', 'CampaignName', 'CampaignId',
'CampaignStatus', 'Labels', 'Amount', 'AveragePosition',
'SearchImpressionShare', 'Impressions', 'Clicks', 'Cost'],
'predicates': {
'field': 'CampaignStatus',
'operator': 'IN',
'values': ['ENABLED', 'PAUSED']
}
}
}
stream_data = report_downloader.DownloadReportAsStream(
report, skip_report_header=True, skip_column_header=True,
skip_report_summary=True, include_zero_impressions=False)
This has been migrated to adswords:
credentials = {
"use_proto_plus": True,
"developer_token": gk.ads_dev_token,
"refresh_token": gk.adwords_refresh_token,
"client_id": gk.adwords_client_id,
"login_customer_id": gk.ads_login_customer_id,
"client_secret": gk.adwords_client_secret
}
googleads_client = GoogleAdsClient.load_from_dict(credentials)
ga_service = googleads_client.get_service("GoogleAdsService")
query_ads = '''
campaign.status, campaign_budget.amount_micros,
metrics.search_impression_share, metrics.impressions, metrics.clicks, metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
'''
response = ga_service.search_stream(customer_id=str(acct), query=query_ads)
Depending on the customer_id, google ads reporting kinda 10%- 20% of what googleads return.
Any advice on this, i've read all the articles regarding filtering and i think everything is good on this side.