Skip to content

Install the snippet

The snippet must appear at the top of every page on your site. oa commands cannot send data unless this snippet is on the page, and that snippet appears above any oa commands being called.

All supported integrations with the JavaScript SDK generates the same tag, called the tag management snippet. You can find the snippet within Orbee's Platform.

Paste the snippet immediately after the <head> tag on every page of your website. Replace the API_TOKEN placeholder with the appropriate ID. The script is made up of two parts:

  • the tag manager script.
  • the snippet initialization.

You only need one snippet initialization per page. If multiple accounts or scripts are required, you only need to re-include the tag manager script.

<script async src="https://scripts.orb.ee/tms.js?sid=API_TOKEN"></script>
<script>!function(t){var e=t.oa||{_q:[],_sq:{}};function n(){return this._q=[],this}for(var o=["add","append","clearAll","set","setOnce","unset","remove"],r=0;r<o.length;r++)!function(t,e){t.prototype[e]=function(){return this._q.push([e].concat(Array.prototype.slice.call(arguments,0))),this}}(n,o[r]);e.Association=n;var c=["configure","track","extend","require","setOptOut","onInit","associate"];function s(e){for(var t=0;t<c.length;t++)!function(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}(c[t])}s(e),e.getScope=function(t){return t=(t&&0!==t.length?t:"$default_scope").toLowerCase(),Object.prototype.hasOwnProperty.call(e._sq,t)||(e._sq[t]={_q:[]},s(e._sq[t])),e._sq[t]},t.oa=e}(window);
</script>

Note

This snippet is a tag manager. You will see other tags get added to your website through this script, which can be controlled through Orbee's Platform. Learn more