Meta Pixel (Facebook).

The pixel integration makes it possible to measure various standard events from the order module. By enabling the integration, events are sent to the FBQ tag that is already present on the page.

The following three events are supported: ViewContent, AddToCart and Purchase.

Installation

To enable the events, modify the Gifty script by adding the fbq property and setting it to true.

The events are sent to the Meta pixel on pages where the order module is displayed. The Meta pixel must already be installed on those pages.

          
            
<script>
window.Gifty = {
  key: 'WIDGET_KEY_HERE',
  fbq: true
};
(function (e, t) {
	var n = e.createElement(t);
	n.async = true;
	n.src = 'https://static.gifty.nl/js/widget.js';
	var r = e.getElementsByTagName(t)[0];
	r.parentNode.insertBefore(n, r);
})(document, 'script');
</script>

          
      

Events

The events ViewContentAddToCart and Purchase are supported. Below you will find when we'll send the event and what data the event contains.

EventWhenProperties
ViewContentOrder module viewedcurrency, content_category 
AddToCartProduct (gift card or package deal) added to the ordervalue, currency, content_ids, content_name, content_type, contents
PurchaseAfter placing an ordervalue, currency, content_type, contents, num_items

ViewContent

An example of data that is sent when the order module is viewed.

          
            
fbq('track', 'ViewContent', {
    currency: 'EUR',
    content_category: 'Gift Cards',
});

          
      

AddToCart

An example of data that is sent when a product is added to the order.

          
            
fbq('track', 'AddToCart', {
    currency: 'EUR',
    value: 25.95,
    content_ids: ['package-PACKAGE_ID-ORGANIZATION_ID-2595'],
    content_name: 'Gift Card',
    content_type: 'product',
    contents: [
        {
            id: 'package-PACKAGE_ID-ORGANIZATION_ID-2595',
            quantity: 1,
        }
    ]
});

          
      

Purchase

An example of data that is sent once an order has been placed.

          
            
fbq('track', 'Purchase', {
    currency: 'EUR',
    value: 50.95,
    content_type: 'product',
    contents: [
        {
            id: 'package-PACKAGE_ID-ORGANIZATION_ID-2595',
            quantity: 1,
        },
        {
            id: 'gift-card-ORGANIZATION_ID-2500',
            quantity: 1,
        }
    ],
    num_items: 2,
});

          
      
language