Google Ads Conversion Tracking - Subtask 3
Description
Revenue is only showing up for orders less than $1,000
- Ensure all revenue amounts are showing.
Solution
Use the Liquid string filter remove:',' with the value parameter to ensure commas are removed for price values over 1,000.
Example:
# Input:
123456
'value': {{ subtotal_price | money_without_currency }},
# Output:
1,234.56
'value': {{ order.subtotal_price | money_without_currency | remove:',' }},
# Output:
1234.56
Explanation
Revenue only showing for orders less than $1,000 was likely due to the inclusion of commas in the submitted value parameter. Remember Google expects the conversion value to be a number. Luck for us, this issue was already resolved in Subtask 1 with the addition of remove:',' which removes all commas i.e. 1,000.00 becomes 1000.00.
The Shopify Cheat Sheet is an excellent resource for building Shopify Themes with Liquid including available Tags, Filters, and Objects.