Hi, I have been using Adwords API with Python to fetch some numbers, all the metrics are correct (impressions & clicks) except for the costs. The costs always end with 4 zeros and no separator for decimals.
Below is the result I got (last column is the real cost I pulled from Adwords interface as reference):
Below I attached the python code I was using, would be great if you could take a look and give me some advice:
Thanks!!!
import sys
from googleads import adwords
def main(client):
# Initialize appropriate service.
report_downloader = client.GetReportDownloader(version='v201708')
# Create report query.
report_query = ('SELECT CampaignId, AdGroupId, Id, Criteria, CriteriaType, '
'FinalUrls, Impressions, Clicks, Cost '
'FROM CRITERIA_PERFORMANCE_REPORT '
'WHERE Status IN [ENABLED] '
'DURING LAST_7_DAYS')
# 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.DownloadReportWithAwql(
report_query, 'CSV', sys.stdout, skip_report_header=False,
skip_column_header=False, skip_report_summary=False,
include_zero_impressions=True)
if __name__ == '__main__':
# Initialize client object.
adwords_client = adwords.AdWordsClient.LoadFromStorage()
main(adwords_client)