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.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/33ef6f14-72db-4121-97d9-90a361769ee9n%40googlegroups.com.
  • Go... Alin Alex
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to