Install The Little Ask on your website
One small script per site, added through your HTML, Google Tag Manager or WordPress. You only do this once.
Last reviewed
What you'll do
You add one script to every page of your site. After that, all surveys are managed from your dashboard - publishing or changing a campaign never needs a new install.
The script loads asynchronously and never blocks your page. It also follows page changes on single-page sites without a reload.
Get your snippet
- Open Sites and choose your site.
- In the Install panel, copy the snippet. It contains your own site ID.
It looks like this. YOUR-SITE-ID is a placeholder - always copy your personal snippet from the dashboard.
<script>
(function(w,d,s,n){w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)};
var j=d.createElement('script');j.async=1;j.src=s;d.head.appendChild(j)})(window,document,'https://thelittleask.com/sdk/littleask.js','littleask');
littleask('init',{site:'YOUR-SITE-ID'});
</script>HTML websites
Paste the snippet just before the closing </head> tag, on every page. If your pages share a template or layout file, add it there once.
Google Tag Manager
- In Google Tag Manager, create a new tag of type Custom HTML.
- Paste the snippet.
- Set the trigger to All Pages - or behind your consent trigger if you use one.
- Save, then publish the container.
Google Tag Manager only loads the script. It doesn't decide where inline surveys appear - those need a placement box in your page.
WordPress
Paste the snippet into your theme's header, or into the header and footer script tool your site already uses. There is no official plugin.
Wait for cookie consent
If your site needs consent first, turn on Wait for consent in the site's Settings. Nothing is stored or shown until your consent tool calls:
littleask('consent', true);Optional: form events
For reliable form-abandonment targeting, a developer can send form events. Only event names and a form ID are used - never what visitors type.
littleask.track('form_submitted', { formId: 'lead-form' });The full list of events is under the Form events tab in the Install panel. Without code, you can instead set a form CSS selector in a campaign's Audience step.
Check that it works
- Open any page of your website.
- Back in the dashboard, open the site. The badge changes to "Script seen".
- The Health panel on the same page shows whether surveys are being shown and answered.
You can also choose Open test page in the Install panel to try your campaigns without touching your site.
Common problems
- Still "Waiting for first page load": the snippet isn't on the page yet, the GTM container isn't published, or consent hasn't been given.
- Works on one domain but not another: add the missing domain under Allowed domains.
- Two copies of the script: harmless - it only runs once.
Related guides
Get your first survey live
Add your website, install the script once, publish a campaign and see your first answer - in about fifteen minutes.
Place an inline page-helpfulness survey
Ask "Was this page helpful?" inside your content. Needs the normal install plus a small placement box where the question should appear.
My survey isn't appearing
Work through the usual causes in order: script, publishing, pages, audience, frequency and consent.