The analytics integration can send purchase events to your Google Analytics property. Google Tag (GA4) and Google Tag Manager are supported.

When someone completes a purchase through the Gifty order widget, the tag installed on your website receives the purchase event.


To enable the purchase event, modify your Gifty script by adding the gtag property and setting it to true.

window.Gifty = {
  gtag: true
(function (e, t) {
	var n = e.createElement(t);
	n.async = true;
	n.src = '';
	var r = e.getElementsByTagName(t)[0];
	r.parentNode.insertBefore(n, r);
})(document, 'script');



The purchase event is sent when someone completes ordering a gift card through the Gifty order widget. The event includes the total gift card value and product types.

In the item_variant property, you can find more details on the ordered product. The example below shows an order of one gift card with the Gifty hoodie package (ID: 1). The order also contains two monetary gift cards.

Note that additional items like wrappings and shipping are excluded on purpose, as this does not count towards your revenue.

gtag("event", "purchase", {
  transaction_id: "or_E04koXGzj8dl92nb1ywQZgx5",
  value: 185,
  tax: 0.00,
  shipping: 0.00,
  currency: "EUR",
  items: [
      item_id: "gifty-gift-card",
      item_name: "Gifty Gift Card",
      item_variant: "Package: Gifty hoodie (1)",
      price: 35,
      quantity: 1
      item_id: "gifty-gift-card",
      item_name: "Gifty Gift Card",
      item_variant: "Value: 7500",
      price: 75,
      quantity: 2