Cookie Sellsy

You only have a a Sellsy cookie + Google Analytics and you don't want to use Google Tag Manager to install it?

You only have a Sellsy cookie + Google Analytics and you don't want to use Google Tag Manager to install it?

1. Video Presentation

Gérer son chat conformément au RGPD

A - Sellsy chat representation

B - Locate it on your website

Here is the code that loads the Sellsy chat and that you should have in your site Header.

<script type="application/javascript" src="https://www.sellsy.fr/?_f=snippet&hash=JUU0JUY4JThFJTgyLSU4QSVFQyVCRiVBQiVBRSUyMyVBNyVENmolQzMlMjUlRkIlOTglQUIlQzAlRjQlMTN4JUJBJUFDQiUwQSVFRnUlMDElQUElQUJhJTI3JTBCJUM5JThDJTJDJTI2byVCNSUxMDFJNiUwMiU4MiU5NiVFNiVFNiVBMTclQjAlOTclMDlPRCVENSVBNyUxOCVENiVCRiU2MCUzQw=="></script>

It should look like this :

We have to delete the script or deactivate it.

C - Trigger it with Axeptio

We'll transform the script and encapsulate it in a function that allows the script to launch (the launchSellsy function).

<script type="text/javascript">
    function launchSellsy(){
      var el = document.createElement('script');
      el.setAttribute('src', 'https://www.sellsy.fr/?_f=snippet&hash=JUU0JUY4JThFJTgyLSU4QSVFQyVCRiVBQiVBRSUyMyVBNyVENmolQzMlMjUlRkIlOTglQUIlQzAlRjQlMTN4JUJBJUFDQiUwQSVFRnUlMDElQUElQUJhJTI3JTBCJUM5JThDJTJDJTI2byVCNSUxMDFJNiUwMiU4MiU5NiVFNiVFNiVBMTclQjAlOTclMDlPRCVENSVBNyUxOCVENiVCRiU2MCUzQw==');
      document.head.append(el);
    }

Then we take back the function that allows script launches in the Axeptio back office, and we organize it so that if the user chooses Sellsy it launches the function that executes the Sellsy script.

    void 0 === window._axcb && (window._axcb = []);
    window._axcb.push(function(axeptio) {
      axeptio.on("cookies:complete", function(choices) {
        if(choices.Sellsy) {
          launchSellsy();
        }
      });
    });

We'll then simply add the full script right after the SDK which will look like :

<script type="text/javascript">
//Le sdk qui permet de lancer le widget Axeptio et de sauvegarder les acceptations
window.axeptioSettings = {
  clientId: "5c11ff5ce95cd64112feab79",
};
 
(function(d, s) {
  var t = d.getElementsByTagName(s)[0], e = d.createElement(s);
  e.async = truee.src = "//static.axept.io/sdk.js";
  t.parentNode.insertBefore(e, t);
})(document, "script");

// La fonction qui permet de lancer SellSy
    function launchSellsy(){
      var el = document.createElement('script');
      el.setAttribute('src', 'https://www.sellsy.fr/?_f=snippet&hash=JUU0JUY4JThFJTgyLSU4QSVFQyVCRiVBQiVBRSUyMyVBNyVENmolQzMlMjUlRkIlOTglQUIlQzAlRjQlMTN4JUJBJUFDQiUwQSVFRnUlMDElQUElQUJhJTI3JTBCJUM5JThDJTJDJTI2byVCNSUxMDFJNiUwMiU4MiU5NiVFNiVFNiVBMTclQjAlOTclMDlPRCVENSVBNyUxOCVENiVCRiU2MCUzQw==');
      document.head.append(el);
    }

// La fonction qui relie Axeptio au lancement du cookie Sellsy
    void 0 === window._axcb && (window._axcb = []);
    window._axcb.push(function(axeptio) {
      axeptio.on("cookies:complete", function(choices) {
        if(choices.Sellsy) {
          launchSellsy();
        }
      });
    });
    </script>

Congrats ! the Sellsy chat now only appears after the user agreed to it

Last updated