Skip to content

Getting started

Install the Unless snippet

Unless runs on your website through a single script snippet. Once it is in place, everything else - the AI component, audiences, and the JavaScript API - works from your dashboard without further code changes.

To let an AI agent like ChatGPT, Claude or your coding assistant do the install for you, give it this URL: https://docs.unless.com/getting-started/install-the-snippet.md. That is this page as a single Markdown file, so one fetch is all the agent needs.

The snippet contains your own account ID, so you have to copy it from your account:

  1. Open Account settings in the Unless dashboard.
  2. Click the Get Unless snippet button.
  3. Copy the code from the install instructions dialog.

Paste the code into the HEAD section of the HTML on your website, on every page where you want Unless to run:

<html>
<head>
<!-- other head tags -->
<!-- paste your Unless snippet here -->
<script data-unless="1.3" data-installer="snippet">...</script>
</head>
<body>
...
</body>
</html>

If your site is built with a template, a theme, or a tag manager, add it once to the shared layout or as a custom HTML tag that loads on all pages.

Load a page of your website and check that window.Txt exists in the browser console. If it does, the snippet is running.