Skip to main content

Basic installation

Add the <script> tag before </body> on every page:

Calling identify

Because the snippet loads asynchronously, call identify() with a guard:
In practice, you can call window.zenstep.identify() directly — the queue captures it automatically before the snippet has loaded:

jQuery example

If you’re using jQuery and identifying the user on document ready:

Multi-page applications

For traditional server-rendered apps (PHP, Rails, Django, etc.), add the snippet in your base layout template and call identify() on every page after the authenticated user is available.
base_layout.html (example)
Render user data server-side into a <script> block only if you trust the output escaping of your template engine. Never inject unsanitised user input into JavaScript.

Verifying installation

Open the browser console. After the snippet loads you’ll see:
If there are no published flows, you’ll see no message — that’s expected. Check the Install page in the dashboard for a “Snippet detected” confirmation.