Revenue Tracking

Revenue Tracking typically tracks the revenue generated each time a customer spends money on your website. For example, consider an eCommerce site where users make purchases. You can track the revenue generated from the purchase on the thank-you page and consider this data to make decisions about your A/B tests. 

To track your revenue you need to hard-code the following snippet on your thank-you page – insert it directly on your site – it's very important that the code is inserted directly on the page and not via GTM or similar tag managers.

<script> window._fpEvent=window._fpEvent||[];window._fpEvent.push(["addRevenue",{revenue:%revenue_amount%}]); window._fpEvent.push(["eventConversion",{value:"purchase"}]); </script>

Important: You need to replace %revenue_amount% with the variable that contains the purchase amount. Please get in touch with your platform provider to find out the variable name – for example, you can use the following code on Shopify.

<script> let revenueFP = "{{ total_price | money_without_currency }}"; revenueFP = revenueFP.replace(',',''); window._fpEvent=window._fpEvent||[];window._fpEvent.push(["addRevenue",{revenue:revenueFP}]); window._fpEvent.push(["eventConversion",{value:"purchase"}]); </script>

Related Articles:

  1. What Does Track Revenue Mean?

  2. How Is Revenue Per Visit RPV Calculated?

  3. How Many Conversion Goals Can I Have For A Test?
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.