In-App Product Tours

In-App Product Tours allow users to trigger any Supademo or Showcase from their workspace directly within their app as a modal overlay.

Using a few lines of code, you can now surface unlimited onboarding demos, product tutorials, or new feature highlights throughout your entire app.

Simply add a one-line Supademo script to your app and you’ll be able to open a Supademo or Showcase in a full-screen modal by adding a small ID to any button, tooltip, or clickable element.

How to set up in-app product tours using Supademo

1) Install our client-side SDK

Our SDK lets you display Supademos directly in your app. Add the following code anywhere inside the <head> or <body> tags.

<script src="https://script.supademo.com/script.js"></script>

2) Initialize the SDK for Dynamic Elements

If your button or trigger element is rendered dynamically (e.g., through frameworks like React or Vue), you need to initialize the SDK after the element is loaded. Use the following code to reinitialize Supademo for any new elements added to the DOM.

HTML

<script>Supademo("9921e7b9b9f41229a4685784185321286970d37953a46402d029315a037921bf", {variables: {email: "", name: "", custom_variable: ""}});</script>

REACT

useEffect(() => {Supademo("9921e7b9b9f41229a4685784185321286970d37953a46402d029315a037921bf", {variables: {email: "", name: "", custom_variable: ""}});}, []);

ANGULAR

ngAfterViewInit() {//@ts-ignoreSupademo("9921e7b9b9f41229a4685784185321286970d37953a46402d029315a037921bf", {variables: {email: "", name: "", custom_variable: ""}});}

VUE

mounted() {Supademo("9921e7b9b9f41229a4685784185321286970d37953a46402d029315a037921bf", {variables: {email: "", name: "", custom_variable: ""}});}

SVELTE

onMount(() => {Supademo("9921e7b9b9f41229a4685784185321286970d37953a46402d029315a037921bf", {variables: {email: "", name: "", custom_variable: ""}});});

3) Trigger a Supademo or Showcase

Trigger a Supademo or Showcase via button/element click

To display a Supademo or Showcase, add our data attribute to any HTML element you want to act as a trigger. When a user clicks the element with this attribute, it will open the Supademo in a modal window. Please note that you can add the bolded part of the code snippet to any element.
// TRIGGER SUPADEMO VIA CLICK  
<button data-supademo-demo="YOUR_DEMO_ID">View Demo</button>
// TRIGGER SHOWCASE VIA CLICK 
<button data-supademo-showcase="YOUR_SHOWCASE_ID">View Showcase</button> 

Trigger a Supademo or Showcase programmatically via event

You can also programmatically trigger Supademos and Showcases by using javascript events — such as first load, first view, state, or value.

// TRIGGER SUPADEMO VIA EVENT
Supademo("YOUR_API_KEY").loadDemo("YOUR_DEMO_ID")
// TRIGGER SHOWCASE VIA EVEENT
Supademo("YOUR_API_KEY").loadShowcase("YOUR_SHOWCASE_ID")

Note: Replace YOUR_DEMO_ID or YOUR_SHOWCASE_ID with the actual id of your specific Supademo or Showcase.

See the full instructions in-app by visiting this link.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us