To configure the CMP in its CTV/HbbTV version, you need to edit the file where it will be implemented (e.g., index.html) in a code editor.
The CMP is loaded by declaring a variable and loading a file.
In the code below, you need to replace the URL {{URL}} with the URL we will provide you, which contains the CMP configuration and is hosted on the Sibbo server.
We include the variable and load the JavaScript file on all pages that load the CMP within the <head> tag of the page as follows:
- <html>
- <head>
- ...
- <script charset="utf-8">
- window.sibboCMPParams = {
- core: "",
- config: "{{URL}}",
- development: false,
- useLoader: false,
- useDOMContentLoaded: true
- };
- </script>
- <script src="https://cmp.sibbo.net/v2.2/sibbo-cmp-router.js" defer="true" charset="utf-8"></script>
- ...
- </head>
- </html>
The attribute charset="utf-8" is important, as without it the text may appear with incorrect characters.
The load must be included as early as possible in the code. This is necessary because the
API (sibbo-cmp-router.js) must load before any other script starts making requests.
It is mandatory to add a link or button with the text "Cookies" or "Cookie Settings" on the page hosting the CMP, which triggers the SibboCMP.open() method. This will bring up the CMP.
Example:
- <a href="#" rel="nofollow" onclick="SibboCMP.open()">Cookies</a>