Implementing multiple Checkout Launcher interfaces
How to implement multiple Checkout Launcher interfaces
In some cases you might want to have a different Launcher on one or more pages that differ from the rest. Or on some pages you do not even want to display a Checkout launcher. Following instruction will explain how to do this.
Let's say that we have a website, MyWebsite, with 4 Pages: page1, page2, page3 and Page4. Page 1 and Page 2 need to have Launcher1, Page 3 needs to have launcher2 ( with a different Token) and page 4 does not need a Launcher. to accommodate do the following :

Only include the main script into your website's <head> tag for all pages.

<script type="text/javascript" async src="https://cdn.embr.org/embeddables.es.js"></script>
<script type="text/javascript">
(function(){if(!window.EMBR){const t=[];window.EMBR={_init:t,mount:e=>t.push(e)}}})()
/* START EMBED CODE */
/* END EMBED CODE */
</script>

You need to have the 2 Launcher code snippets prepared

On Page 1 and Page 2 add the Embr.mount for the First Checkout Launcher between /* START EMBED CODE */ /* END EMBED CODE */
script type="text/javascript" async src="https://cdn.embr.org/embeddables.es.js"></script>
<script type="text/javascript">
(function(){if(!window.EMBR){const t=[];window.EMBR={_init:t,mount:e=>t.push(e)}}})()
/* START EMBED CODE */
//Sample code for the Checkout Launcher1
window.EMBR.mount({
type: 'CheckoutLaunchButton',
options: {
checkoutId: '01G6B8C2MNN9J5MZZX9XTRKRQ8',
label: 'Buy Embr as well',
theme: 'light',
location: 'center'
}
})
/* END EMBED CODE */
</script>
On Page 3 add the Embr.mount for the Second Checkout Launcher between /* START EMBED CODE */ /* END EMBED CODE */
script type="text/javascript" async src="https://cdn.embr.org/embeddables.es.js"></script>
<script type="text/javascript">
(function(){if(!window.EMBR){const t=[];window.EMBR={_init:t,mount:e=>t.push(e)}}})()
/* START EMBED CODE */
//Sample code for the Checkout Launcher2
window.EMBR.mount({
type: 'CheckoutLaunchButton',
options: {
checkoutId: '01G71WMMF9DP9W49QYS91WGYCZ',
theme: 'dark',
location: 'center'
}
})
/* END EMBED CODE */
</script>
On Page4 you do not add any code snippet, and thus no launcher will be displayed.
Copy link
On this page
Only include the main script into your website's <head> tag for all pages.
You need to have the 2 Launcher code snippets prepared