Local script Management
The script management logic described on the previous pages can be used for JavaScript functions. You just have to wrap the latter to call it in the same way as a remote script.
This method allows a great technical simplification of the tag management. However, it is important to keep in mind that legal expertise is necessary to figure out how to apply it by yourself.
For each tag/beacon, you must:
  • Evaluate the possible presence of non-exempted trackers (cookies, indexdb, local storage, etc.) (ePrivacy Directive)
  • Evaluate the processing of personal data and, if applicable, the purposes pursued by your partners and their respective legal bases (GDPR)
  • Evaluate if a tag/beacon is automatically supported by your partners thanks to the CMP APIs (e.g.: Google and Microsoft Bing's "Consent Mode")
Don't hesitate to ask our team to set up these packaging for you:

Example 1

<script>
console.log("demo");
</script>
becomes, when inserted in main source code:
<script>
function myScript() {
console.log("demo");
}
</script>
<script data-cmp-src="myScript"></script>
or via a Tag Manager:
<script>
function myScript() {
console.log("demo");
}
</script>
<script data-cmp-src="myScript"></script>
<script>try{Sddan.cmp.triggerTM();}catch(e){}</script>

Example 2

<script>
(function() {
console.log("demo");
})();
</script>
becomes, when inserted in the main source code:
<script>
function myScript() {
(function() {
console.log("demo");
})();
}
</script>
<script data-cmp-src="myScript"></script>
or via a Tag Manager:
<script>
function myScript() {
(function() {
console.log("demo");
})();
}
</script>
<script data-cmp-src="myScript"></script>
<script>try{Sddan.cmp.triggerTM();}catch(e){}</script>
All the advanced features described on the next page are available when managing these scripts in your main page or via the Tag Manager.
Copy link