VisitorLoop Docs

Sites & Installation

Connect your website to VisitorLoop so widgets and chat can appear on your pages.

Creating a site

Go to Settings → Sites in the dashboard.

Click Add site. Enter a display name (e.g. "Main website") and your domain (e.g. example.com).

Click Save. You'll receive a unique siteKey — keep it handy for the next step.

Installing the loader script

Add the following <script> tag inside the <head> of every page you want widgets to appear on. Replace YOUR_SITE_KEY with the key from the previous step.

<script
  src="https://visitorloop.app/loader.js"
  data-site="YOUR_SITE_KEY"
  async
></script>

Placement matters

Put the script in <head>, not <body>. Loading it asynchronously with async ensures it never blocks page rendering.

WordPress

Install a plugin like Insert Headers and Footers and paste the script into the Header section. Alternatively, add it directly to your theme's header.php inside the <head> tag.

Webflow

In Project Settings → Custom Code → Head Code, paste the script tag. Publish the project for it to take effect.

Shopify

In Online Store → Themes → Edit code → theme.liquid, paste the script just before the closing </head> tag.

Restricting allowed domains

By default, any origin can load widgets using your siteKey. Once your site is live you should lock it down:

  1. Open the site in Settings → Sites.
  2. Under Allowed domains, add every domain that should be permitted (e.g. example.com, www.example.com).
  3. Requests from any other origin will be blocked at the API level.

Staging environments

Remember to add your staging domain too (e.g. staging.example.com) if you test widgets there — otherwise the config API will return a CORS error and no widgets will load.

Verifying installation

Once the script is on your page, open the site in a browser, then return to the VisitorLoop dashboard. Go to Widgetsand publish one. Reload your website — the widget should appear. If it doesn't, check the browser console for script errors and confirm the siteKey matches.

Multiple sites

Each domain you manage should be a separate site. Widgets, leads, and conversations are scoped to a site, so traffic from store.example.com and blog.example.com can be tracked independently. You can create as many sites as your plan allows.