How to track gift card sales with Google Analytics, Meta Pixel and Tag Manager
You can track gift card sales by connecting the Gifty order module to Google Analytics 4, the Meta Pixel, Google Ads or Tag Manager. After every order the module sends a purchase or conversion with the order ID and value to the channel you switch on. That shows you which campaign sells gift cards. Below you find what to set up per integration and where it often goes wrong.
How to track gift card sales in short
- How: you add a property to the Gifty script on your website: gtag: true, fbq: true, or gads with your conversion details.
- What: Google Analytics 4 and Tag Manager receive a purchase event, Meta receives ViewContent, AddToCart and Purchase, Google Ads a conversion.
- First: the Google tag or Meta Pixel must already be on the same page. Gifty does not install them for you.
- Note: the integrations work with the script on your own website, not on the direct Gifty link.
Why track gift card sales?
Without tracking you only know that gift cards were sold. With tracking you know where those orders came from: an Instagram post, a newsletter, an ad or a search. That helps you decide where to spend your time and ad budget.
A gift card is not an ordinary product either. Part of your sales falls around the holidays, and then you want to see quickly what works. The order module measures the order when it is confirmed, not when the card is redeemed. So you see sales, not spending.
What can you track with the Gifty order module?
The order module runs as a separate layer on your page. A pixel or tag on your website therefore does not see what happens inside the module by itself. Gifty passes those events on once you switch an integration on.
| Integration | Property in the script | What is sent |
|---|---|---|
| Google Analytics 4 | gtag: true | purchase with order ID, total value, currency and gift cards |
| Tag Manager | gtag: true | the same purchase event, which you forward in Tag Manager |
| Meta Pixel | fbq: true | ViewContent, AddToCart and Purchase |
| Google Ads | gads: your conversion ID and label | conversion with order ID, value and currency |
The value in the event is the total value of the gift cards in the order. Packaging and shipping costs are left out on purpose, because they do not count towards your revenue. What you do not track: cards you create yourself in the dashboard, cards you sell in the shop and orders through the direct Gifty link.
How do you connect Google Analytics 4 to the order module?
First make sure the Google tag of your Analytics property is on the page with the order module. Only then change the Gifty script. If the Google tag is missing, nothing happens.
- Open the page on your website where you placed the Gifty script.
- In window.Gifty add the property gtag: true next to your key.
- Save and publish the page.
- Place an order and check in Analytics, in the Realtime report or DebugView, whether a purchase arrives.
- Check in the e-commerce purchases reports that the order ID and value are correct.
The purchase event contains the order ID (transaction_id), the total value, the currency and a list of items. Each gift card is an item. A card with a fixed amount shows as Value in the variant, a package deal as Package. The exact fields are in the Google Analytics 4 documentation. Google recommends sending the purchase event with these fields (see Google’s recommended events).
How do you set up the Meta Pixel for gift cards?
The Meta Pixel must already be on your website, above the Gifty script. Gifty does not manage your pixel ID and does not add the pixel. Then add fbq: true to the Gifty script.
The order module then sends three events to your pixel: ViewContent when someone views the order page, AddToCart when a gift card or package is added to the order, and Purchase after the order is placed. In Meta you see not only sales but also how many people open the order module and add a card. See the Meta Pixel documentation for the data per event.
How do you measure gift card sales as a Google Ads conversion?
Create a conversion action in your Google Ads account and copy the conversion ID and label. It looks like this: AW-XXXXXXXXX/XXXXXXXXXXXX. Put that value in the Gifty script as the property gads.
Once a payment is completed, the order module sends a conversion with the order ID, the value and the currency to Google. The order ID keeps the same order from being counted twice. Steps and an example are in the Google Ads documentation.
Note: the Google tag must also be on the page for Google Ads. If you use Tag Manager with a dataLayer, the order module works through that dataLayer.
When do you use Google Tag Manager?
If you manage your tags in Tag Manager, also set gtag: true in the Gifty script. The order module sends a purchase event, and from Tag Manager you forward it to Google Analytics, Google Ads or other tools. That way you do not have to change the Gifty script when you add a channel later.
- Set gtag: true in the Gifty script.
- In Tag Manager create a trigger on the purchase event.
- Attach the tags for Analytics, Google Ads or another channel to that trigger.
- Test in Tag Manager preview mode first, then with a real order.
See the Tag Manager documentation for the event and the fields. If you measure a channel through Tag Manager, do not also send it directly from the script. Otherwise the same order can appear twice in your report.
What mistakes come up most when tracking gift card sales?
- The pixel or tag is missing or sits below the Gifty script. Put the Meta Pixel and the Google tag on the page, and load them before the order module.
- The value is not true. Only gtag: true and fbq: true switch the integration on. The text ‘true’ in quotation marks does not work.
- You sell through the direct Gifty link. The integrations only work with the script on your own website. If your Instagram profile links to the direct link, you will not see those sales in Analytics. Point your link to the page with the order module on your site instead, with UTM parameters added.
- You test without an order. The event only fires after a confirmed order. Visiting the order page is not enough.
- You count twice. Passing the same order to a channel through Tag Manager and directly.
- You forget consent. Pixels and tags run on your website. The consent question in your cookie banner is yours to handle.
Frequently asked questions
Google Analytics 4 and Tag Manager receive a purchase event with the order ID, total value, currency and the gift cards in the order. Meta receives ViewContent, AddToCart and Purchase. Google Ads receives a conversion with order ID, value and currency.
With the Google Analytics 4 and Tag Manager integration, the order module only measures the purchase. AddToCart and ViewContent only go to the Meta Pixel.
No. For each integration the order module remembers in the browser session which order it already reported and skips the same order.
You place the pixels and tags on your own website, so you also handle visitor consent. Gifty does not install the Meta Pixel and does not manage your pixel ID or tags. Get legal advice if you are unsure about your cookie banner.
Not with these integrations. They work with the script on your own website. On the direct order link they are not switched on and you cannot add your own code.
No. The integrations measure orders that customers place through the order module on your website. Cards you create yourself in the dashboard or sell in the shop do not show up in Google Analytics, Meta or Google Ads.