Place this code at the end of your <Head></Head>
tag
<script src="<https://cdn.jsdelivr.net/gh/qualli-research-platform/qualli-js-sdk/build/index.browser.min.js>"></script>
This will load our lightweight SDK into your website.
Now only thing left to do is to initialise (boot) Qualli. Place the following code at the end of your body tag.
<script>
window.onload = function() {
Qualli.init('YOUR_API_KEY', {
trackScreens: true // default 'true'
});
};
</script>
Your Api Key can be found on our platform. Navigate to “settings” → “API Keys” (guide here)
We recommend placing the init at the root level, although this can also be done in your JS code, on the place you like (e.g. after a login)
Qualli.init('YOUR_API_KEY', {
trackScreens: true // default 'true'
});
Triggers can be used to show surveys with fine grain control. Use triggers if you want to show surveys at very specific moments in your users journey, e.g. A user abandons their cart.
<aside> ⚠️ The following triggers are reserved for Qualli, and can't be used:
app_user_identified
app_user_created
session_started
session_ended
app_opened
app_closed
app_backgrounded
track_screen
</aside>To invoke a trigger, use the performTrigger
function:
window.Qualli.performTrigger('TRIGGER_NAME');