Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,59 @@
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | relative_url }}">
<link rel="stylesheet" href="{{ "/assets/css/custom.css" | relative_url }}">

<!-- OneTrust Cookies Consent Notice start for rapids.ai -->
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" data-document-language="true" type="text/javascript" charset="UTF-8" data-domain-script="018e2d71-40f3-7e89-90b8-e10ec6012ab0-test" ></script>
<script type="text/javascript">
function OptanonWrapper() {
var event = new Event('bannerLoaded');
window.dispatchEvent(event);
}
</script>

<!-- OneTrust Cookies Consent Notice end for rapids.ai -->
<script type="text/javascript" src="https://images.nvidia.com/aem-dam/Solutions/ot-js/ot-custom.js"></script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DLJNCEWKZD"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-DLJNCEWKZD');
function hasAnalyticsConsent() {
return typeof OnetrustActiveGroups === 'string' &&
OnetrustActiveGroups.split(',').includes('C0002');
}

function loadGA4() {
if (window._ga4Loaded) return;
window._ga4Loaded = true;
var gtagScript = document.createElement('script');
gtagScript.async = true;
gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-DLJNCEWKZD';
document.head.appendChild(gtagScript);
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
window.gtag = window.gtag || gtag;
gtag('js', new Date());
gtag('config', 'G-DLJNCEWKZD');
}

function initAnalyticsIfConsented() {
if (hasAnalyticsConsent()) {
loadGA4();
}
}

if (document.readyState === 'complete') {
initAnalyticsIfConsented();
} else {
window.addEventListener('load', initAnalyticsIfConsented);
}

if (window.OneTrust && typeof window.OneTrust.OnConsentChanged === 'function') {
window.OneTrust.OnConsentChanged(function () {
initAnalyticsIfConsented();
});
}
</script>

<script src="https://assets.adobedtm.com/5d4962a43b79/814eb6e9b4e1/launch-4bc07f1e0b0b.min.js"></script>

{% if site.search_enabled != nil %}
Expand Down
Loading