Consent managers
Consent managers often block unknown scripts by rewriting the tag to type="text/plain". The widget then shows nothing and logs no error. Categorise the script as below and it loads.
For your privacy team
The widgets set no cookies and store no analytics or advertising identifiers. They don't track visitors across sites and include no third-party analytics. The only data they keep is the visitor's own saved settings, listed on Storage and privacy. You can categorise them as strictly necessary or functional.
Tags
<script src="https://oddsrelay.io/widgets/v1/oddsrelay-widgets.js"
data-cookieconsent="ignore"
crossorigin="anonymous" async></script>Cookiebot. Cookiebot blocks unrecognised third-party scripts by rewriting the tag to type="text/plain" until consent. This attribute tells it the script is exempt.
OneTrust. C0001 is OneTrust's strictly-necessary category. Without an explicit class, OneTrust auto-categorises against its own database and an unknown script on a betting-adjacent domain is a likely marketing classification.
Any other consent manager: categorise the script as strictly necessary or functional.
Loading after consent
To load the script only after consent, call this from your consent-granted callback. Widgets already on the page mount when it arrives; call window.OddsRelay.scan() if you add more later.
<!-- Blocked until your consent callback runs -->
<script type="text/plain" data-src="https://oddsrelay.io/widgets/v1/oddsrelay-widgets.js"></script>
<!-- In your consent-granted callback -->
<script>
function loadOddsRelayWidgets() {
var s = document.createElement("script");
s.src = "https://oddsrelay.io/widgets/v1/oddsrelay-widgets.js";
s.crossOrigin = "anonymous";
s.async = true;
// The bundle scans the document when it loads, so any host elements
// already on the page mount by themselves. Call scan() again only if
// you add more afterwards.
document.head.appendChild(s);
}
</script>Visitors who decline see an empty space; if the widget is the page's content, categorise it as functional instead.
Check whether consent is blocking it
View the rendered page source and look at our script tag. If it reads type="text/plain", or the src has been moved to a data- attribute, your consent manager rewrote it and the browser never ran it. If the tag is untouched and the widget is still missing, it is a Content-Security-Policy or a mount-timing problem instead. See Content-Security-Policy and Install and troubleshooting.