I am using AdWords API report downloader to get Store Visits for all my campaigns daily.
I Can see the store visits in the AdWords Dashboard, but the API does not pull these Store Visits in the report.
Sometimes the report pulls the Store Visits, but not for all campaigns that have store visits in the AdWords dashboard.
import logging
import sys
from googleads import adwords
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)
client_file = "C:\Lowes\python\ga\googleads.yaml"
def main(client):
report_downloader = client.GetReportDownloader(version='v201802')
report = {
'reportName': 'Last 7 days CRITERIA_PERFORMANCE_REPORT',
'dateRangeType': 'LAST_7_DAYS',
'reportType': 'CRITERIA_PERFORMANCE_REPORT',
'downloadFormat': 'CSV',
'selector': {
'fields': ['CampaignId','ConversionCategoryName','ConversionTypeName','ExternalConversionSource','AllConversions']
}
}
# 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.DownloadReport(
report, sys.stdout, skip_report_header=True, skip_column_header=False,
skip_report_summary=True, include_zero_impressions=False)
if __name__ == '__main__':
adwords_client = adwords.AdWordsClient.LoadFromStorage(client_file)
adwords_client.SetClientCustomerId('XXXXXXXXX')
main(adwords_client)