Skip to main content

Install

In <head>, add the _raasCsa stub (inline), then the async RaaS <script> with your data-* fields.

Example

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Your page</title>

<!-- 1) Stub: queues _raasCsa calls until the bundle is ready. -->
<script type="text/javascript" charset="utf-8">
(function (g, o) {
g[o] =
g[o] ||
function () {
(g[o].q = g[o].q || []).push(arguments);
};
g[o].t = Date.now();
})(window, "_raasCsa");
</script>

<!-- 2) Bundle: reads data-* when it runs. -->
<script
async
src="https://cdn.ace1m.com/raas/v1/raas.global.js"
data-tenant-id="YOUR_ACE1M_TENANT_ID"
data-tenant-key="YOUR_ACE1M_TENANT_KEY"
data-allocated-channels='["ch1","ch2","ch3","ch4","ch5"]'
data-verbose="false"
></script>
</head>
<body>
<!-- Your content -->
</body>
</html>

data-* attributes

AttributeRequiredNotes
data-tenant-idYes*Tenant id from your Ace 1 Media contact. Trims whitespace.
data-tenant-keyYes*Publishable key from your Ace 1 Media contact. Visible in HTML source.
data-allocated-channelsYes*JSON array of strings inside the attribute, e.g. '["ch1","ch2"]'. Use only channels allocated for RaaS, not for other tags.
data-verboseNotrue / 1 / yes enables SDK console logging. Omit or use false in production. Default false.

*Required on the bundle <script> for the SDK to start.

If nothing happens, set data-verbose="true" temporarily and check the browser console, or confirm data-* values with your Ace 1 Media contact.

Content Security Policy

If you use CSP, allow the script origin you load RaaS from. Your Ace 1 Media contact will list any other hosts to allow.