Install / Embed Script
The Cueflow embed script displays messages (banners, modals, checklists, feedback surveys, and changelogs) to your users directly in your application.
Installation
Add the script tag to your HTML, before the closing </body> tag:
<script
src="https://script.cueflow.so/embed/cueflow.js"
data-workspace-id="YOUR_WORKSPACE_ID">
</script>Basic Setup
After loading the script, initialize Cueflow with your user's data:
<script>
Cueflow.init({
id: 'user-123', // Required - unique user identifier
email: '[email protected]',
name: 'Jane Smith',
plan: 'pro'
});
</script>Complete Example
How It Works
Script loads - Cueflow script initializes on your page
User identified - You call
Cueflow.init()with user dataMessages fetched - Cueflow checks which messages match this user
Messages displayed - Matching banners, modals, etc. are rendered
Navigation tracked - On SPA navigation, messages are re-evaluated
Available Methods
Cueflow.init(user)
Initialize with user data
Cueflow.update(data)
Update user attributes
Cueflow.track(event, props)
Track custom events
Cueflow.check()
Manually check for messages
Cueflow.shutdown()
Remove all messages and cleanup
Framework Integration
React / Next.js
Vue.js
Angular
SPA Support
Cueflow automatically detects navigation in Single Page Applications by listening to:
pushState/replaceStatecallspopstateevents
When navigation is detected, Cueflow re-evaluates targeting rules and shows/hides messages accordingly.
Next Steps
Cueflow.init() - Full reference for initialization
Cueflow.track() - Event tracking guide
Cueflow.update() - Updating user data
Troubleshooting - Common issues and solutions
Last updated