After you have added a Facebook Pixel code to a florist site, you can now add in the the script to track the Purchase event coming from Facebook.


In the header you will have already pasted the Facebook Pixel Code for their account.


Then, open Settings > General > Advanced Options


Switch to source mode and paste in the following:


<script>

fbq('track', 'Purchase', {

  value: getTotal(),

  currency: 'EUR'

});

</script>





The getTotal() function is what has been added to that page to return the value of the order. The above example is for Feehilys using EUR, so change to GBP for any UK florists.


Additional Event tracking


You can use some of the other Meta standard events https://www.facebook.com/business/help/402791146561655?id=1205376682832142 by creating eventListeners for things.


For example, to run the ViewContent event only on Product pages, we can add script to the footer to check the page url for "/design-" and then fire the Meta event.


<script>

if (window.location.href.indexOf('/design-') !== -1) {

  fbq('track', 'ViewContent');

}

</script>