Campaign Performance Report data differs from time to time in params ImpressionReach and AverageFrequency

84 views
Skip to first unread message

timl...@mmlab.io

unread,
Jan 31, 2019, 5:16:01 PM1/31/19
to AdWords API and Google Ads API Forum

I use GoogleAds API to get CAMPAIGN_PERFORMANCE_REPORT, and the information about periods in past differs from time to time. It differs only in ImressionReach and AverageFrequence params: in some cases it is null, in some not.

For example: {'CampaignId': '128616739', 'ExternalCustomerId': '6516505374', 'CampaignName': <NAME>, 'CampaignGroupId': '3969059', 'CampaignStatus': 'paused', 'ServingStatus': 'eligible', 'StartDate': '2013-04-07', 'EndDate': ' --', 'AdvertisingChannelType': 'Display', 'AdvertisingChannelSubType': ' --', 'Impressions': '42643', 'Clicks': '60', 'Engagements': '0', 'VideoViews': '0', 'Conversions': '0.00', 'AverageCpc': '18178167', 'AverageCpm': '25577234', 'Ctr': '0.14%', 'ImpressionReach': '2311', 'AverageFrequency': '18.5', 'Cost': '1090690000', 'Month': '2018-01-01'}, {'CampaignId': '128616739', 'ExternalCustomerId': '6516505374', 'CampaignName': <NAME>, 'CampaignGroupId': '3969059', 'CampaignStatus': 'paused', 'ServingStatus': 'eligible', 'StartDate': '2013-04-07', 'EndDate': ' --', 'AdvertisingChannelType': 'Display', 'AdvertisingChannelSubType': ' --', 'Impressions': '42643', 'Clicks': '60', 'Engagements': '0', 'VideoViews': '0', 'Conversions': '0.00', 'AverageCpc': '18178167', 'AverageCpm': '25577234', 'Ctr': '0.14%', 'ImpressionReach': ' --', 'AverageFrequency': '0.0', 'Cost': '1090690000', 'Month': '2018-01-01'}

Looks like a bug to me. Is it?

demotes...@gmail.com

unread,
Feb 1, 2019, 6:09:25 AM2/1/19
to AdWords API and Google Ads API Forum
Can you send the code which fetches this data

googleadsapi...@google.com

unread,
Feb 3, 2019, 11:58:33 PM2/3/19
to AdWords API and Google Ads API Forum
Hi,

I can see that my colleague, Milind, has reached out to you privately regarding your concern. You may continue your discussion on the private thread for better communication.

@demotestevent74 - If you are encountering issues with the AdWords API, you could open your concern on a new thread for better tracking.

Regards,
Dannison
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/3a7deadd-72db-4be5-995d-b596be292d85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

timl...@mmlab.io

unread,
Feb 4, 2019, 5:28:50 AM2/4/19
to AdWords API and Google Ads API Forum

from googleads import adwords
import csv
from io import StringIO


API_VERSION
= 'v201809'

REPORT_TYPE_FIELDS
= {
   
'ACCOUNT_PERFORMANCE_REPORT': [
       
'ExternalCustomerId',

       
'Impressions',
       
'Clicks',
       
'VideoViews',
       
'Conversions',

       
'AverageCpc',
       
'AverageCpm',
       
'Ctr',

       
# 'AverageFrequency',  # isn't available

       
'Cost',

   
],
   
'CAMPAIGN_PERFORMANCE_REPORT': [
       
'CampaignId',

       
# data to create campaign
       
'ExternalCustomerId',
       
'CampaignName',
       
'CampaignGroupId',

       
'CampaignStatus',
       
'ServingStatus',

       
'StartDate',
       
'EndDate',

       
'AdvertisingChannelType',
       
'AdvertisingChannelSubType',

       
# statistics
       
'Impressions',
       
'Clicks',
       
'Engagements',
       
'VideoViews',
       
'Conversions',

       
'AverageCpc',
       
'AverageCpm',
       
'Ctr',

       
'ImpressionReach',
       
'AverageFrequency',

       
'Cost',
   
],
}

PAGE_SIZE
= 500


class StatisticsAggregationTimeType(enum.Enum):
    WEEKLY
= 'weekly'
    MONTHLY
= 'monthly'


def get_performance_report(
        customer_id
,
       
# instance of googleads.adwords.AdWordsClient (https://github.com/googleads/googleads-python-lib/blob/master/googleads/adwords.py#L173)
        adwords_api_client
,
        aggregation_time_type
=None,
        report_type
=None,
        from_date
=None,
        to_date
=None,
):
   
if aggregation_time_type == StatisticsAggregationTimeType.WEEKLY:
        time_slice
= 'Week'
   
if aggregation_time_type == StatisticsAggregationTimeType.MONTHLY:
        time_slice
= 'Month'

   
assert report_type in (
       
'ACCOUNT_PERFORMANCE_REPORT',
       
'CAMPAIGN_PERFORMANCE_REPORT',
   
)

   
print('getting {} for customer {}'.format(report_type, customer_id))

    report_downloader
= adwords_api_client.GetReportDownloader(
        version
=API_VERSION
   
)
    report_fields
= REPORT_TYPE_FIELDS[report_type] + [time_slice]

   
params = {
       
'reportName': 'current report',

       
'reportType': report_type,
       
'downloadFormat': 'CSV',
       
'selector': {
           
'fields': report_fields,
       
}
   
}
   
if from_date is None and to_date is None:
       
params['dateRangeType'] = 'ALL_TIME'
   
else:
       
params['dateRangeType'] = 'CUSTOM_DATE'
        date_range
= params['selector'].setdefault('dateRange', {})
       
if from_date is not None:
            date_range
['min'] = from_date.strftime('%Y%m%d')
       
if to_date is not None:
            date_range
['max'] = to_date.strftime('%Y%m%d')

    report_stream
= StringIO(report_downloader.DownloadReportAsString(
       
params,
        client_customer_id
=str(customer_id),
        skip_report_header
=True,  # report name and dates
        skip_column_header
=True,  # column names - will take them from report_fields
        skip_report_summary
=True,  # total (last line)
        include_zero_impressions
=True,
   
))
    csv_reader
= csv.reader(report_stream, delimiter=',')
    report
= [dict(zip(report_fields, report_line))
             
for report_line in csv_reader]
   
print('report is ready, len: {}'.format(len(report)))
   
return report
Введите код...


пятница, 1 февраля 2019 г., 14:09:25 UTC+3 пользователь demotes...@gmail.com написал:

timl...@mmlab.io

unread,
Feb 11, 2019, 5:50:27 AM2/11/19
to AdWords API and Google Ads API Forum
Hello. Is there any progress on this task?


timl...@mmlab.io

unread,
Feb 13, 2019, 5:33:55 AM2/13/19
to AdWords API and Google Ads API Forum
Hello, is there any progress on the task?

понедельник, 4 февраля 2019 г., 7:58:33 UTC+3 пользователь googleadsapi-forumadvisor написал:

googleadsapi...@google.com

unread,
Feb 13, 2019, 9:57:51 AM2/13/19
to AdWords API and Google Ads API Forum
Hi there,

My colleague and I had reached out to you privately regarding this question as below:

I was able to replicate the issue. For last month, I can see the values for ImpressionReach (3,536) , AverageFrequency (11.1). But for last 3 month, I can see value as --. I ran the campaign performance report for last 1 and 3 month. I can see the behavior in API too. Could you please confirm, if you are seeing the same behavior in API and UI? As the behavior is same in the API and UI, then this issue is not related to AdWords API. You will need to post your questions to AdWords Product team. You could reach out to the AdWords Product Team through the contact options available on this page.

Could you please take a look and let us know if you have any further questions?

Regards,
Dhanya, AdWords API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

timl...@mmlab.io

unread,
Feb 13, 2019, 12:51:52 PM2/13/19
to AdWords API and Google Ads API Forum
Thanks, I have no further questions :)

среда, 13 февраля 2019 г., 17:57:51 UTC+3 пользователь googleadsapi-forumadvisor написал:
Reply all
Reply to author
Forward
0 new messages