# Adding Orb when your platform only accepts code, not a script tag

> Some platforms only let you paste script contents, not a full <script> tag with attributes. Orb still works: build the tag in JavaScript instead. Same behaviour, same data.

Applies to: UNAS, and other rented shop or CMS platforms with a code-only script box.

## The problem

The standard Orb snippet is an HTML tag with attributes:

```html
<script async src="https://orbmcp.com/orb.js" data-site="SITE_ID"></script>
```

Some platforms give you a box that only accepts what goes between `<script>` and `</script>`, so that tag cannot be pasted.

## The fix

Paste this into the box instead, with nothing around it, replacing SITE_ID with your own site ID:

```js
var s = document.createElement('script');
s.async = true;
s.src = 'https://orbmcp.com/orb.js';
s.setAttribute('data-site', 'SITE_ID');
document.head.appendChild(s);
```

It builds the same tag from JavaScript. Behaviour is identical.

## What to watch

- **It has to run on every page.** Use the platform’s global header or footer setting rather than adding it to a single page. A snippet on the home page alone records only the home page.
- **The domain has to match.** The domain registered in Orb must match the site’s real domain. If it does not, events are discarded and you see no traffic at all, even though the script is loading correctly. It is the most common reason an install looks fine but records nothing.
- **Nothing else changes.** Cookieless the same way, same events, same data. The only difference is how the tag gets onto the page.

## Checking it worked

Open the site's page in Orb and use the install check. It confirms traffic is arriving and reports any events rejected for a hostname mismatch.

---

Other platforms: https://orbmcp.com/install
Questions: joe@orbmcp.com
