Skip to main content
Website surveys run from one script tag per site. The tag loads asynchronously, the widget renders inside its own Shadow DOM, and when Usertick can’t be reached the page loads as usual without the widget.

Copy the install code

Every site has its own install code, and Settings → Sites shows each site as a tab.
1

Open Sites

Go to Settings → Sites.
2

Add the site

If the domain isn’t listed yet, select Add site, enter its Website address and select Add site again.
3

Copy the code

Open the site’s tab and select Copy on the code.
A site that is still waiting for its code opens first and shows the code right away. On a connected site, the code and the ways to hand it on stay folded until you select Show code. The code is one tag, and its file name is the site’s ID:
Don’t edit the code. The site ID ties it to one site, and the widget runs only on that site’s domain and its subdomains.

Add the code to your site

Paste the tag into the <head> of every page where the widget should run:
The site’s tab also has three ways to get the code onto the site without doing that by hand:
  • Ask an AI assistant opens a new chat in ChatGPT, Claude or Cursor with the request already written: the tag, the site’s domain and where the tag goes. Copy prompt copies the same request for any other assistant.
  • Send to a developer emails the tag and the steps to an address you enter. Usertick sends the email itself and names you as the person who asked, and the developer doesn’t need a Usertick account. A site can send 5 of these emails per hour, and the row shows only for members whose role has the Manage sites permission.
  • Other ways to install opens with Show all. It shows the npm code for React, Next.js, Vue, Nuxt, Angular, Svelte, Astro, Remix and Gatsby, and links to the platform guides.

Platform guides

On a website builder, a store or a tag manager, the tag goes into that platform’s own setting for head code. Platform guides has the steps for each one. In a single page app, either the script tag or the npm package works. Both follow client-side route changes. See Install with npm.

Check the install

1

Open the site

After the code is live on your site, go to Settings → Sites and open the site’s tab.
2

Check the install

Select Check now.
Usertick loads https://<domain>/ and looks for the site’s tag in the HTML the page returns. When the tag is there, the site’s status changes from Waiting for the code to Connected. A website survey can be published only after its site is connected. The check can run again after 10 seconds. On a connected site, and after a check that didn’t find the code, the button reads Check again. The button shows only for members whose role has the Manage sites permission. When the check doesn’t find the code, its answer stays at the top of the site’s tab:
The check reads the HTML of the home page only. When Usertick is added through a tag manager or the npm package, the tag isn’t in that HTML, so the check can’t find it. In that case, also add the script tag to the home page. The tag and the package share one widget on the page, so a survey never shows twice.
The check also can’t find the tag while the home page isn’t the page visitors will get: a site in a website builder that hasn’t been published yet, or a Shopify store that still shows its password page. To see a survey on the site, publish a website survey for it and open a page that matches the survey’s targeting. If nothing appears, see Troubleshooting.

How the widget behaves on the page

  • The tag has async, so the page never waits for it.
  • The widget renders inside a closed Shadow DOM. Your CSS doesn’t reach the widget, and the widget’s CSS doesn’t reach your page.
  • The widget runs only on the site’s domain and its subdomains. On any other host, it shows nothing.
  • The site’s code file carries its live surveys. Browsers can keep the file for up to 5 minutes, so a survey that was just published, edited or paused can take up to 5 minutes to change for a visitor who already had the page open.
  • When a response can’t be sent because of a network error, the widget keeps it in the browser and retries in the background and on later page loads. A response that still hasn’t been sent after 7 days is discarded. When the survey has a closing date, a response given before the survey closed is accepted only when it arrives within 3 days of the close.