Google Ads api return only some portion of rows compared to adwords api

55 views
Skip to first unread message

Alin Alex

unread,
Feb 23, 2022, 4:08:22 AM2/23/22
to Google Ads API and AdWords API Forum
I am currently migrating from adwords to googleads and i kinda matched the following query:
adwords:
 

        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 = '''
        SELECT segments.date, segments.device, customer.descriptive_name, campaign.name, campaign.id,
            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.

Google Ads API Forum Advisor

unread,
Feb 23, 2022, 11:34:02 AM2/23/22
to alinal...@gmail.com, adwor...@googlegroups.com
Hi Alin,

Thank you for reaching out to the Google Ads API support team.

To investigate the issue further, could you please provide us with the complete logs (request and response with request-id)  via the Reply privately to the author option? 

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WyHU1:ref
Reply all
Reply to author
Forward
0 new messages