Show survey on demand
To trigger Website Embed after certain user actions, e.g. to show the survey based on particular requirements, you should do these two things:
- Start 'embed hidden' by setting
Zenloop.isVisible = false;
- Call 'show overlay' method
Zenloop.showOverlay();
Full example with a button:
<script id="zl-website-overlay-loader" async src="https://zenloop-website-overlay-production.s3.amazonaws.com/loader/zenloop.load.min.js?survey=<survey_hash_id>"></script>
<script>
var Zenloop = window.Zenloop || {};
Zenloop.isVisible = false;
</script>
<button onclick="Zenloop.showOverlay()">Show embed</button>
Updated about 3 years ago