Embedding surveys on your website
Embed surveys on your website using the Frill Script or iframe code. Surveys can display automatically based on your trigger settings or be launched programmatically with JavaScript.
Before embedding surveys, install the Frill Script from Settings > Company > Frill Script. This enables all widget features including user identification and targeting.
Automatic display with Frill Script
Once the Frill Script is installed, published surveys automatically appear based on your trigger, location, and frequency settings. No additional code needed—just configure your survey and publish it.
Manual trigger with JavaScript
Launch a survey on demand using the Frill API:
window.Frill('survey', {key: 'your-survey-key'});Use this to trigger surveys from:
Button clicks
Form submissions
Custom user actions or events
Find your survey key in the survey settings under the Trigger tab when "Trigger with code" is selected.
Iframe embedding
Embed a survey directly as an iframe without the Frill Script:
Open your survey's settings
Click the dropdown menu and select Iframe
Copy the generated iframe code
Paste it into your HTML where you want the survey to appear
Iframe embeds are self-contained and don't require the Frill Script, but they can't use user identification or advanced targeting.