Script Snippet Installation
The most flexible way to add biskoui to your website using the JavaScript snippet.
Getting Your Snippet
- Log into your biskoui dashboard at biskoui.ch
- Add your domain in the dashboard (e.g.,
example.com) - In the biskoui dashboard view, go to manual install and copy your script snippet - it includes your unique site identifier
Anatomy of the biskoui integration script:
<script>
window.biskouiSettings = {
clientId: REPLACE_WITH_YOUR_CLIENT_ID,
};
(function (d, s) {
var t = d.getElementsByTagName(s)[0],
e = d.createElement(s);
e.async = true;
e.src = "https://static.biskoui.ch/sdk.js";
t.parentNode.insertBefore(e, t);
})(document, "script");
</script>
Replace REPLACE_WITH_YOUR_CLIENT_ID with your actual site ID from the dashboard.
Replace https://static.biskoui.ch/sdk.js with https://cdn.biskoui.ch/sdk.js for PRO subscription. This will use our CloudFlare CDN for faster loading.
Before and After Integration
Before: Unmanaged Third-Party Services
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
<!-- Direct Google Analytics loading (no consent) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
</script>
</head>
<body>
<!-- YouTube embed loads immediately -->
<iframe src="https://www.youtube.com/embed/VIDEO_ID"></iframe>
</body>
</html>
After: Consent-Managed Services
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
<!-- biskoui loads first, manages all other services -->
<script>
window.biskouiSettings = {
clientId: "your-site-id",
};
(function (d, s) {
var t = d.getElementsByTagName(s)[0],
e = d.createElement(s);
e.async = true;
e.src = "https://static.biskoui.ch/sdk.js";
t.parentNode.insertBefore(e, t);
})(document, "script");
</script>
<!-- Google Analytics removed - now managed by biskoui dashboard -->
</head>
<body>
<!-- YouTube embeds now managed by biskoui -->
</body>
</html>
Installation Steps
1. Add to HTML Head
Place the snippet in your website's <head> section:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Your Website</title>
<!-- Biskoui Snippet -->
<script>
window.biskouiSettings = {
clientId: "your-unique-site-id",
};
(function (d, s) {
var t = d.getElementsByTagName(s)[0],
e = d.createElement(s);
e.async = true;
e.src = "https://static.biskoui.ch/sdk.js";
t.parentNode.insertBefore(e, t);
})(document, "script");
</script>
<!-- Other head content -->
</head>
<body>
<!-- Your website content -->
</body>
</html>
2. Domain Configuration
Ensure your domain is configured in the Biskoui dashboard:
- Go to Settings → Domains
- Add your production and staging domains
- Save the configuration
Configuration Options
Required Settings
clientId
Your unique site identifier from the dashboard, set in window.biskouiSettings.
Script URL
Always use https://static.biskoui.ch/sdk.js for the CDN version.
Basic Configuration
<script>
window.biskouiSettings = {
clientId: "your-site-id",
};
(function (d, s) {
var t = d.getElementsByTagName(s)[0],
e = d.createElement(s);
e.async = true;
e.src = "https://static.biskoui.ch/sdk.js";
t.parentNode.insertBefore(e, t);
})(document, "script");
</script>
Next Step: Choose How Services Run
After installing the biskoui snippet, choose how each service should be activated and executed (directly by biskoui, via GTM, via Zaraz, etc.):
Placement Considerations
Best Practices
✅ Do:
- Place in
<head>for optimal performance - Use the
asyncattribute - Load before other third-party scripts
- Test on staging before production
❌ Don't:
- Place in the body (delays initialization)
- Load synchronously (blocks page rendering)
- Use multiple instances on the same page
- Modify the script URL