Articles on: Integrations

Facebook Pixel

We integrate with Facebook Pixel automatically if it is detected on the page (these can be disabled if needed)

If you want to add more tracking you can use the following Javascript code:

<script>  

document.body.addEventListener('th:order:confirmed', function(event) {

    var currency = amount = event.detail.total.split(' ')[0]

    var amount = event.detail.total.split(' ')[1]

    var uniqueOrderId = event.detail.id

    // your custom tracking code

  });

</script>


OR

<script>

  $(function() {

    $(document.body).on('th:order:confirmed', function(event) {

      gtag('event', 'conversion', {

        'send_to': 'AW-784030222/QrKLCOnZ_44BEI607fUC',

        'transaction_id': event.originalEvent.detail.id

      });

    });

  });

</script>


OR

<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', '1983518208612876');

</script>

Updated on: 03/01/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!