Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Subscriptions
English French
English French

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: