You are able to add tracking codes and custom JS to the success page (or the thank you page of our checkouts). These scripts will be invoked in a separate iframe when success page is reached. 

To add your own code simply do the following 👇

  • Go here
  • Paste your code in the blank field.
  • Click save, and you're done!

How do I add product price or ID to my tracking code?

You may want to track the value of each conversion. This is pretty easy with a little javascript know-how. We're going to us the Facebook conversion pixel code as an example.

Example: Facebook

Here is the Facebook conversion tracking javascript code. 

<!-- Facebook Pixel Code -->
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', 'YOURIDHERE');
  fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
  src="https://www.facebook.com/tr?id=YOURIDHERE&ev=PageView&noscript=1"
/></noscript>

<script>
  fbq('track', 'Purchase', {
    value: 0.00,
    currency: 'USD',
  });
</script>

<!-- End Facebook Pixel Code -->


The important part here is in the last line where it says {'value':'0.00','currency':'USD'}, we're going to add our own javascript variable here to pass the product / subscription price.

❗ Please note that you can now easily integrate with FB Pixel without meddling with JS by simply going to the App Store and by following on-screen instructions. 


Available Variables in Javascript

We can access any of the following object variables in javascript which we make available on the checkout success page:

 var product = {
        'id': 999, 	
        'price' : 0.00, 	
        'name': "Product name" 
 }; 	
var cart = {
      'id': 0,  
      'total' : 0.00,   
      'number_of_items': 2,
      'products' : [
          {
            'id': 1,
            'quantity': 1
          },
          {
            'id': 4,
            'quantity': 1
          },
      ]
    };

So now we can use these in our Facebook tracking code like so... This is just the last line from the above Facebook tracking code.


Twig Variables

In addition, as of just now, you can also make use of Twig variables, which is not the same as Javascript but can be input similarly.

Those variables include:

NameVariable
Customer ID{{customer.id}}
Customer First Name{{customer.first_name}}
Customer Last Name{{customer.last_name}}
Customer Email{{customer.email}}
Order ID (A unique ID){{order.id}}
Order Total{{order.amount}}
Order Currency ISO Code{{order.currency}}
Order Timestamp{{order.timestamp}}

Putting It All Together

fbq('track', 'Purchase', {
    value: cart.total,
    currency: '{{order.currency}}',
});