Skip to main content

Authenticated Visitor

If the website has an authentication process, you can also set this identity within illow's banner to enable the consent to work cross-device and cross-browser. This means that the consent will stop being anonymized, since the user ID you supply will be stored along with the choices.

To do this, you simply need to call illow's Website SDK "identify" method and pass the user ID you will be using.

Log in example
  <head>
<script>
const logIn = () => {
/* ... */
const userId = /* extract the user ID once signed in */
window.illow.identify(userId);
}
</script>
</head>
<body>
<button onclick="window.logIn()">Log in</button>
</body>

Once this is done, when the cookie banner is loaded on the website, it will first fetch the consent stored at illow's server (if any). The user ID will be used as the fetching ID. Then, the widget will show the UI that corresponds:

  1. If the user did not give any previous consent, the banner will be shown
  2. If the user did give a previous consent, the icon or link will be shown to resurface the notice, if needed.

If permissions are changed, the updated version is sent back to illow's server to sync it with any other device where the user is identified.

When the user logs out, you need to call illow's Website SDK "removeIdentity" method to go back to anonymized consent mode that does not include any user ID whatsoever either locally or the server. Once again, the user's choices will not be cross-device.

Log out example
  <head>
<script>
const logOut = () => {
/* ... */
window.illow.removeIdentity();
}
</script>
</head>
<body>
<button onclick="window.logOut()">Log out</button>
</body>

The Gist

Authenticated Visitor Flow