Skip to main content

Redeem Gift Component

In order for Tonos to display the redeem gift component to your customers, the page URL should contain a query parameter, named tgid. This parameter is appended to the redemption URL which is sent to the gift receiver.

There are two ways to display the redeem gift component:

  1. It is automatically displayed by the Tonos script. You do not need to write any code. If you do not wish to automatically display this, it can be disabled in the script. If you do so, then you need to follow step two, which requires additional setting up.
tonos.autoShowRedeemGift = false; // This disables the auto-show of the redeem gift component
  1. Insert a special script for the redeem gift component.
tonos.on('redeemGift', () => {
// This allows you to manually select where the gift component will be displayed
tonos.showRedeemGift('html-element-id'); // The id attribute of the HTML element where the gift component will be displayed
});