title: Conditional Statement in Google Ad Words Conversion Tracking Code
body: <p>I have a Shopify store with three different products, and my ad words account manager is running an optimization script that tries to maximize profit using the price of each product as the revenue value. The problem with this is it isn't including the production costs of each product (just the advertising costs), so some sales are being recognized as profitable when including the production costs would actually make the sale occur at a loss.</p>
  
  <p>I think I can fix this by changing the conversion value from the price of the product to the price minus the production costs, and I know I can identify which product is being ordered by the subtotal price rather than having to interface with Shopify.</p>
  
  <p>I believe I just need to alter this line of code to set constant values to google_conversion_value based on the three possible subtotal prices.</p>
  
  <pre><code>if ({{ subtotal_price }}) { var google_conversion_value = {{ subtotal_price | money_without_currency }}; }
  </code></pre>
  
  <p>I suspect this is pretty straightforward for someone who knows javascript, but I have no experience with it at all.</p>