Skip to content

Commit

Permalink
starting conversion variable with required values
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoaleixogoogle committed Oct 27, 2023
1 parent a10e624 commit c701a7a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'])),
Expand Down

0 comments on commit c701a7a

Please sign in to comment.