title: How do I replace a javascript object's value with a calculated value?
body: <p>I am setting up Google Analytics Ecommerce tracking for a client who hosts their shopping cart on Shopify. I have the integration working just fine, except that Shopify's total revenue per order needs to be divided by 100 for it to be accurate. For example, an order comes in with $8.72 in revenue, but the value passed to Google Analytics is 872. </p>
  
  <p>Here is the entire code for bringing Shopify's data into Google Analytics. The field I need to divide by 100 is {{ total_price }}.</p>
  
  <pre><code>&lt;!-- Begin Google Analytics Ecommerce Tracking --&gt;
  &lt;script&gt;
  ga('require', 'ecommerce');
  
  ga('ecommerce:addTransaction', {
    'id': '{{ id }}',                             // Transaction ID. Required.
    'affiliation': 'myClient',                    // Affiliation or store name.
    'revenue': '{{ total_price }}',               // Total revenue.
    'shipping': '{{ order.shipping_price }}',     // Shipping.
    'tax': '{{ order.tax_price }}'                // Tax.
    'currency': 'USD'                             // Local currency.
  });
  
  ga('ecommerce:send');
  
  &lt;/script&gt;
  </code></pre>