> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usertick.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Usertick runs surveys on websites, by link, by QR code and by email, and collects every response in one inbox with reports, dashboards and workflows. The REST API lives at https://app.usertick.com/api/public/v1 and uses Bearer API keys or OAuth access tokens; the JavaScript SDK is the @usertick/snippet package on npm.

# Install Usertick

> Add Usertick to your website: copy your site's install code, follow the steps for your platform and check that the site is connected.

To run website surveys, you add one line of code to your site. Select your platform in the menu at the top of this page to see only its steps. Link, QR code and email surveys work without an install.

## Copy your install code

**1. Open Sites**

In Usertick, go to **Settings → Sites**.

**2. Add your site**

If your domain isn't listed, select **Add site**, enter the **Website address** and select **Add site**.

**3. Copy the code**

Select the site and select **Copy** on its code.

Each site has its own code, which works only on that site's domain and its subdomains, so don't edit it. When you open this page from Usertick, every code block on it already contains your site's ID.

```html theme={"theme":{"light":"github-light","dark":"github-dark"}}
<script async src="https://cdn.usertick.com/s/YOUR_SITE_ID.js"></script>
```

Above the code, the **Install code** row offers other ways to get it onto your site:

* **AI assistant** opens ChatGPT, Claude or Cursor with the install request already written.
* **Developer** emails the code and the steps to your developer, who doesn't need a Usertick account.
* **Other ways** shows the npm code for JavaScript frameworks.

**HTML**

## Add the code to your site

Paste the code into the `<head>` of every page where surveys should appear, and then publish the change.

```html theme={"theme":{"light":"github-light","dark":"github-dark"}}
<head>
  ...
  <script async src="https://cdn.usertick.com/s/YOUR_SITE_ID.js"></script>
</head>
```

Your page doesn't wait for the code to load, and your site's styles don't affect the survey.

**WordPress**

## Add the code in WordPress

A header code plugin adds the code to every page, and these steps use the free WPCode plugin.

1. In the WordPress admin, go to **Plugins → Add New Plugin**, then install and activate WPCode.
2. Go to **Code Snippets → Header & Footer** and paste the code into **Header**.
3. Select **Save Changes**, then clear the page cache if the site uses one.

**WooCommerce**

## Add the code in WooCommerce

A WooCommerce store runs on WordPress, so the code added in WordPress covers the store too.

1. In the WordPress admin, go to **Plugins → Add New Plugin**, then install and activate WPCode.
2. Go to **Code Snippets → Header & Footer** and paste the code into **Header**.
3. Select **Save Changes**, then clear the page cache if the site uses one.

**Shopify**

## Add the code in Shopify

1. In the Shopify admin, go to **Online Store → Themes**.
2. On your theme, select **…** and then **Edit code**.
3. Open `layout/theme.liquid`, paste the code right before `</head>` and save.

Surveys don't run on Shopify's checkout pages. While the store's password page is on, **Check now** can't find the code. The site still connects when the widget loads for a visitor who is past the password page.

**Webflow**

## Add the code in Webflow

1. Open **Site settings** and select the **Custom code** tab.
2. Paste the code into **Head code** and select **Save changes**.
3. Publish the site.

Webflow allows custom code on a paid Workspace or a site with an active Site plan.

**Wix**

## Add the code in Wix

1. In the site's dashboard, go to **Settings → Custom Code**.
2. Select **+ Add Custom Code** and paste the code.
3. Select **All pages** and **Head**, and then select **Apply**.

Wix runs custom code only on a published site with a connected domain. After a domain change, add the code again.

**Squarespace**

## Add the code in Squarespace

1. Open the **Code Injection** panel in the site's settings.
2. Paste the code into **Header** and select **Save**.

Squarespace includes code injection in the Core, Plus and Advanced plans.

**Framer**

## Add the code in Framer

1. Open the project's settings and select the **Custom Code** tab.
2. Select **Add Script**, paste the code and place it at the end of the head.
3. Publish the site. Surveys appear only on the live site and don't show in the canvas preview.

**Ghost**

## Add the code in Ghost

1. In Ghost Admin, go to **Settings → Advanced → Code injection**.
2. Paste the code into **Site header** and save.

**HubSpot**

## Add the code in HubSpot

For pages hosted on HubSpot:

1. Select the settings icon, then go to **Content → Pages**.
2. Select the domain to edit.
3. Paste the code into **Site header HTML** and select **Save**.

**BigCommerce**

## Add the code in BigCommerce

1. Go to **Storefront → Script Manager** and select **Create a Script**.
2. Set **Placement** to **Head**, **Location** to **Storefront pages**, **Script type** to **URL** and **Load method** to **Async**.
3. Enter the address from your code as the script URL and select **Save**:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
https://cdn.usertick.com/s/YOUR_SITE_ID.js
```

**Magento**

## Add the code in Magento

1. In the Admin, go to **Content → Design → Configuration** and select **Edit** on the store view.
2. Under **Other Settings → HTML Head**, paste the code into **Scripts and Style Sheets**.
3. Select **Save Configuration**, then flush the cache if the storefront still shows old pages.

**Bubble**

## Add the code in Bubble

1. Open the **Settings** tab and select **SEO / metatags**.
2. Paste the code into **Script/meta tags in header**.
3. Deploy the app to live.

**Carrd**

## Add the code in Carrd

1. Select **Add Element**, then **Embed**.
2. Set **Type** to **Code** and paste the code.
3. Set **Style** to **Hidden**, select **Head** and publish the site.

Embeds require Carrd Pro Standard or higher.

**Unbounce**

## Add the code in Unbounce

1. Go to **Settings → Script Manager** and select **Add a Script**.
2. Set **Placement** to **Head** and paste the code.
3. Select the domains it applies to and select **Save Changes**.

Script Manager works only with a custom domain.

**Joomla**

## Add the code in Joomla

1. In the administrator, go to **System → Site Templates** and open your template.
2. In the **Editor** tab, open the file with the head (`index.php` in the default template) and paste the code before `</head>`.
3. Save the file.

Edit a child template, because a Joomla update overwrites the default one.

**Google Tag Manager**

## Add the code in Google Tag Manager

1. In the container, select **Tags → New**.
2. Select **Custom HTML** and paste the code.
3. Add the **All Pages** trigger, save, then submit and publish the container.

A tag manager adds the code after the page loads, so **Check now** can't see it. The site connects by itself the first time the widget loads on one of its pages: after you publish the container, open your site in a browser.

**Adobe Tags**

## Add the code in Adobe Tags

1. Open **Rules** and select **Create New Rule**.
2. Add a **Core** event of the type **Library Loaded (Page Top)**.
3. Add a **Core** action of the type **Custom Code**, set the language to **HTML** and paste the code.
4. Save the rule, then add it to a library, build it and publish it.

A tag manager adds the code after the page loads, so **Check now** can't see it. The site connects by itself the first time the widget loads on one of its pages: after you publish the container, open your site in a browser.

**Matomo Tag Manager**

## Add the code in Matomo Tag Manager

1. In the container, select **Create New Tag** and then **Custom HTML**.
2. Paste the code and set **Position** to **Head End**.
3. Attach a **Pageview** trigger, then create a version and publish it.

A tag manager adds the code after the page loads, so **Check now** can't see it. The site connects by itself the first time the widget loads on one of its pages: after you publish the container, open your site in a browser.

**npm**

## Add Usertick with npm

Install the package:

```bash npm theme={"theme":{"light":"github-light","dark":"github-dark"}}
npm install @usertick/snippet
```

```bash yarn theme={"theme":{"light":"github-light","dark":"github-dark"}}
yarn add @usertick/snippet
```

```bash pnpm theme={"theme":{"light":"github-light","dark":"github-dark"}}
pnpm add @usertick/snippet
```

Call `init` once when the app starts, with the site ID from your install code. The widget follows route changes automatically.

```tsx React theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { useEffect } from "react";
import Usertick from "@usertick/snippet";

export default function App() {
  useEffect(() => {
    Usertick.init({ site_id: "YOUR_SITE_ID" });
    return () => Usertick.destroy();
  }, []);

  return <main>{/* your app */}</main>;
}
```

```tsx Next.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
// app/usertick.tsx, rendered once in app/layout.tsx
"use client";
import { useEffect } from "react";
import Usertick from "@usertick/snippet";

export function UsertickInit() {
  useEffect(() => {
    Usertick.init({ site_id: "YOUR_SITE_ID" });
    return () => Usertick.destroy();
  }, []);
  return null;
}
```

```ts Vue theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { createApp } from "vue";
import App from "./App.vue";
import Usertick from "@usertick/snippet";

Usertick.init({ site_id: "YOUR_SITE_ID" });
createApp(App).mount("#app");
```

```ts Nuxt theme={"theme":{"light":"github-light","dark":"github-dark"}}
// plugins/usertick.client.ts
import Usertick from "@usertick/snippet";

export default defineNuxtPlugin(() => {
  Usertick.init({ site_id: "YOUR_SITE_ID" });
});
```

```ts Angular theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Component, OnInit } from "@angular/core";
import Usertick from "@usertick/snippet";

@Component({ selector: "app-root", templateUrl: "./app.component.html" })
export class AppComponent implements OnInit {
  ngOnInit() {
    Usertick.init({ site_id: "YOUR_SITE_ID" });
  }
}
```

```svelte Svelte theme={"theme":{"light":"github-light","dark":"github-dark"}}
<!-- src/routes/+layout.svelte -->
<script>
  import { onMount } from "svelte";
  import Usertick from "@usertick/snippet";

  onMount(() => {
    Usertick.init({ site_id: "YOUR_SITE_ID" });
    return () => Usertick.destroy();
  });
</script>
```

```astro Astro theme={"theme":{"light":"github-light","dark":"github-dark"}}
<!-- src/layouts/Layout.astro -->
<script>
  import Usertick from "@usertick/snippet";

  Usertick.init({ site_id: "YOUR_SITE_ID" });
</script>
```

```tsx Remix theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { useEffect } from "react";
import { Outlet } from "@remix-run/react";
import Usertick from "@usertick/snippet";

export default function App() {
  useEffect(() => {
    Usertick.init({ site_id: "YOUR_SITE_ID" });
    return () => Usertick.destroy();
  }, []);

  return <Outlet />;
}
```

```js Gatsby theme={"theme":{"light":"github-light","dark":"github-dark"}}
// gatsby-browser.js
import Usertick from "@usertick/snippet";

export const onClientEntry = () => {
  Usertick.init({ site_id: "YOUR_SITE_ID" });
};
```

**Check now** looks for the script tag in your home page, so it can't see the package. The site connects by itself the first time the widget loads on one of its pages: after you deploy, open your site in a browser. To open a survey from your code, see the [SDK reference](https://docs.usertick.com/developers/sdk/reference.md).

## Check the install

1. After the code is live, open a page of your site in a browser. If your site asks visitors for consent before it loads the code, accept it.
2. Go to **Settings → Sites** and select the site.

The site changes from **Waiting for the code** to **Connected** when the widget first loads on one of its pages, and you can then publish its website surveys. **Check now** in the **Connection** row loads your home page and looks for the code right away. If it doesn't find the code, the row tells you what to fix. A change to a published survey can take up to 5 minutes to reach visitors who already have the page open.

If a survey still doesn't appear, see [Troubleshooting](https://docs.usertick.com/installation/troubleshooting.md).

## Next steps

> [card] [Identify users](https://docs.usertick.com/installation/identify.md)
>
> Tell Usertick who is signed in, to target surveys and see who answered.

> [card] [Verify users](https://docs.usertick.com/installation/verify-users.md)
>
> Prove that an identified user is who your site says they are.

> [card] [Cookies and consent](https://docs.usertick.com/installation/cookies-and-consent.md)
>
> See what Usertick stores in the browser and how to connect your consent banner.

> [card] [Troubleshooting](https://docs.usertick.com/installation/troubleshooting.md)
>
> Find what to check when the site doesn't connect or a survey doesn't show.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.