We’ve migrated our documentation to a new site, which means some URLs have changed. If you hit a broken link, submit a support ticket.
Subscriptions

How to trigger an Offer Template Variant ID using JavaScript

You can choose the template variant ID programmatically for the Show Offer action with the below code:

JavaScript
tp.push([
  "init",
  function () {
    tp.offer.show({
      offerId: "XY",
      templateId: "ABC",
      templateVariantId: "123",
      displayMode: "modal",
    });
  },
]);

Last updated: