We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to open another offer template from a button click in an offer template

Important note: Conversions on the second Offer template will not be attributed to the Composer Experience through which you're triggering the initial Offer template.

To achieve this, you can add an external-event to the button in the Offer template. For example like this:

HTML
<input type="submit" external-event="open-template">

Then you will need to add a handler for this in your Composer integration script or anywhere in your website's JavaScript:

tp.push(["addHandler", "checkoutCustomEvent", function(event){\n switch(event.eventName) {\n  case "open-template":\n   tp.offer.show({offerId:'<ID>',templateId:'<ID>'});\n   break;\n   }\n} \n]);

You will just have to specify the values for the offerId and templateId. Please see our documentation here for more information.

Last updated: