]> git.parisson.com Git - teleforma.git/commitdiff
update tarteaucitron config
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Thu, 23 Jan 2025 21:27:52 +0000 (22:27 +0100)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Thu, 23 Jan 2025 21:27:52 +0000 (22:27 +0100)
teleforma/static/teleforma/js/application.js
teleforma/templates/teleforma/base.html

index 1c37dcf0b87f3569d4474f21a996abeafa826f42..8d4390a56b86e3cf214087ff7fccd445e5511593 100644 (file)
@@ -321,4 +321,59 @@ $(document).ready(function () {
         var $form = $this.closest('form');
         $form.find('input[type=checkbox]').prop('checked', isChecked);
     })
-});
\ No newline at end of file
+});
+
+// MATOMO
+
+
+tarteaucitron.init({
+"privacyUrl": "/pages/legal_notices", /* Privacy policy url */
+  "bodyPosition": "bottom", /* or top to bring it as first element for accessibility */
+
+"hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
+"cookieName": "tarteaucitron", /* Cookie name */
+
+"orientation": "middle", /* Banner position (top - bottom) */
+
+  "groupServices": false, /* Group services by category */
+  "showDetailsOnClick": true, /* Click to expand the description */
+  "serviceDefaultState": "wait", /* Default state (true - wait - false) */
+
+"showAlertSmall": false, /* Show the small banner on bottom right */
+"cookieslist": false, /* Show the cookie list */
+
+  "closePopup": false, /* Show a close X on the banner */
+
+  "showIcon": true, /* Show cookie icon to manage cookies */
+  //"iconSrc": "", /* Optionnal: URL or base64 encoded image */
+  "iconPosition": "BottomRight", /* BottomRight, BottomLeft, TopRight and TopLeft */
+
+"adblocker": false, /* Show a Warning if an adblocker is detected */
+
+  "DenyAllCta" : true, /* Show the deny all button */
+  "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
+  "highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */
+  "alwaysNeedConsent": false, /* Ask the consent for "Privacy by design" services */
+
+"handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
+
+"removeCredit": false, /* Remove credit link */
+"moreInfoLink": true, /* Show more info link */
+
+  "useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
+  "useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */
+
+//"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
+
+  "readmoreLink": "", /* Change the default readmore link */
+
+  "mandatory": true, /* Show a message about mandatory cookies */
+  "mandatoryCta": true, /* Show the disabled accept button when mandatory on */
+
+  //"customCloserId": "", /* Optional a11y: Custom element ID used to open the panel */
+
+  "googleConsentMode": true, /* Enable Google Consent Mode v2 for Google ads and GA4 */
+
+  "partnersList": false /* Show the number of partners on the popup/middle banner */
+});
+
index cb65882db4bf7ccaccce88c228a0216ac28a47f9..65cff59175cd8f52423cdf51cabc16a781cd79c0 100644 (file)
@@ -41,6 +41,7 @@
   <script src="/static/teleforma/js/messi.min.js" type="text/javascript"></script>
   <script src="/static/teleforma/js/rainbowvis.js" type="text/javascript"></script>
   <script src="/static/teleforma/js/locale.js" type="text/javascript"></script>
+  <script src="/static/teleforma/tarteaucitron/tarteaucitron.js"></script>
   <script src="/static/teleforma/js/application.js?v={% teleforma_version %}" type="text/javascript"></script>
 
   {% if user.is_authenticated %}
   {% block extra_javascript %}{% endblock %}
 
   {% if not debug %}
-
-    <script type="text/javascript" src="{% static 'teleforma/tarteaucitron/tarteaucitron.js' %}"></script>
-
-    <script type="text/javascript">
-      tarteaucitron.init({
-        "privacyUrl": "/pages/legal_notices",
-        /* Privacy policy url */
-
-        "hashtag": "#tarteaucitron",
-        /* Open the panel with this hashtag */
-        "cookieName": "tarteaucitron",
-        /* Cookie name */
-
-        "orientation": "bottom",
-        /* Banner position (top - bottom) */
-
-        "groupServices": false,
-        /* Group services by category */
-
-        "showAlertSmall": false,
-        /* Show the small banner on bottom right */
-        "cookieslist": false,
-        /* Show the cookie list */
-
-        "closePopup": false,
-        /* Show a close X on the banner */
-
-        "showIcon": true,
-        /* Show cookie icon to manage cookies */
-        //"iconSrc": "", /* Optionnal: URL or base64 encoded image */
-        "iconPosition": "BottomRight",
-        /* BottomRight, BottomLeft, TopRight and TopLeft */
-
-        "adblocker": false,
-        /* Show a Warning if an adblocker is detected */
-
-        "DenyAllCta": true,
-        /* Show the deny all button */
-        "AcceptAllCta": true,
-        /* Show the accept all button when highPrivacy on */
-        "highPrivacy": true,
-        /* HIGHLY RECOMMANDED Disable auto consent */
-
-        "handleBrowserDNTRequest": false,
-        /* If Do Not Track == 1, disallow all */
-
-        "removeCredit": false,
-        /* Remove credit link */
-        "moreInfoLink": true,
-        /* Show more info link */
-
-        "useExternalCss": false,
-        /* If false, the tarteaucitron.css file will be loaded */
-        "useExternalJs": false,
-        /* If false, the tarteaucitron.js file will be loaded */
-
-        //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
-
-        "readmoreLink": "",
-        /* Change the default readmore link */
-
-        "mandatory": true,
-        /* Show a message about mandatory cookies */
-      });
-    </script>
-
     <script type="text/javascript">
       tarteaucitron.user.matomoId = 2;
       (tarteaucitron.job = tarteaucitron.job || []).push('matomo');
     </script>
-
-    <script>tarteaucitron.user.matomoHost = '//matomo.parisson.com/';</script>
-
+    <script>tarteaucitron.  user.matomoHost = '//matomo.parisson.com/';</script>
   {% endif %}
 
   <script type='text/javascript'>