diff --git a/megalista_dataflow/uploaders/google_ads/conversions/google_ads_offline_conversions_uploader.py b/megalista_dataflow/uploaders/google_ads/conversions/google_ads_offline_conversions_uploader.py index e77d26ae..f6432ed2 100644 --- a/megalista_dataflow/uploaders/google_ads/conversions/google_ads_offline_conversions_uploader.py +++ b/megalista_dataflow/uploaders/google_ads/conversions/google_ads_offline_conversions_uploader.py @@ -108,11 +108,12 @@ def _do_upload(self, oc_service, execution, conversion_resource_name, customer_i logging.getLogger(_DEFAULT_LOGGER).info(f'Uploading {len(rows)} offline conversions on {conversion_resource_name} to Google Ads.') conversions = [] for row in rows: - conversion = {} - conversion['conversion_action'] = conversion_resource_name - conversion['conversion_date_time'] = utils.format_date(row['time']) - conversion['conversion_value'] = float(str(row['amount'])) - conversion['gclid'] = row['gclid'] + conversion= { + 'conversion_action': conversion_resource_name, + 'conversion_date_time': utils.format_date(row['time']), + 'conversion_value': float(str(row['amount'])), + 'gclid': row['gclid'] + } if 'external_attribution_credit' in row and 'external_attribution_model' in row: conversion['external_attribution_data'] = { 'external_attribution_credit': float(str(row['external_attribution_credit'])),