When you can only paste code.
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.
01
The problem.
The usual snippet is an HTML tag, and a box that takes code only will not accept one.
<script async src="https://orbmcp.com/orb.js" data-site="SITE_ID"></script>02
The fix.
Paste this instead, with nothing around it, and replace SITE_ID with your own.
It builds the same tag from JavaScript, so Orb behaves exactly as it would otherwise. Your site ID is on your site's page, in the snippet shown there.
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);03
What to watch.
Two of these decide whether an install works at all.
- 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.
04
Checking it worked.
Do not assume it is recording. Check.
Open your site's page in Orb and use the install check. It confirms traffic is arriving, and tells you if events are being rejected because the page's domain does not match the one you registered.