Consent and storage
The assistant works fully without any optional storage. One optional item, a random visitor identifier, depends on the visitor's consent, and you pass that choice to the loader.
Passing consent#
Use either of these. If both are present, the attribute wins.
On the script tag#
<script src="https://chat.nogeek.org/loader.js" async
data-destination="YOUR_PROPERTY_ID"
data-slug="your-property"
data-consent="denied"
data-white-label="true"></script>From your consent tool#
Set window.hfxConsent to "granted" or "denied" before the loader script runs:
<script>
// Read the visitor's saved choice from your consent tool.
window.hfxConsent = myConsentTool.hasAnalyticsConsent() ? "granted" : "denied";
</script>
<script src="https://chat.nogeek.org/loader.js" async
data-destination="YOUR_PROPERTY_ID"
data-slug="your-property"
data-white-label="true"></script>myConsentTool.hasAnalyticsConsent() stands for however your consent tool reports the visitor's choice.
What each value does#
| Value | Visitor identifier |
|---|---|
granted | Created if missing and stored in the page's local storage as hfx-visitor. Sent with the page view and the conversation. |
denied | Not read, not created and not sent. The visitor is never placed in a measurement holdout. |
| Not set, or any other value | The identifier is created and stored, as with granted. |
In the UK and EU, pass consent explicitly. If you don't set a value, the identifier is stored. Where your visitors haven't agreed to optional storage, set denied.
The chat, quotes, enquiries and booking all work the same whichever value you pass.
When the visitor changes their mind#
The loader reads consent once, when it runs. If a visitor changes their choice later on the same page:
- When they withdraw consent, delete the identifier yourself with
localStorage.removeItem("hfx-visitor"). - To apply the new choice to the chat straight away, set
window.hfxConsent, then re-add the loader script (see Single-page apps). Otherwise it applies from the next page load.
Storage keys#
On the property's website#
Stored in the local storage of the page that has the script tag.
| Key | Value | Purpose | Needs consent |
|---|---|---|---|
hfx-visitor | 24 random hexadecimal characters | Counts visits and measures how the assistant performs. Contains nothing about the visitor. | Yes |
hfx-teaser-dismissed:<property ID> | 1 | Remembers that the guest closed the teaser, so it doesn't show again. | No |
Inside the chat#
Stored in the chat iframe's own local storage, on the chat's domain, not on the property's website.
| Key | Value | Purpose | Needs consent |
|---|---|---|---|
hfx-chat:<property ID> | A conversation token and the time it was saved | Lets the conversation continue if the guest reloads the page. Used for up to 24 hours. | No |
Some browsers block or clear storage in iframes from another domain, for example Safari and private windows. The chat then starts a new conversation on reload. Nothing else changes.
At payment#
If the guest pays in the chat, the payment provider may set its own fraud prevention cookies. They are strictly necessary for payment.
The page view#
When it loads, the loader sends one request to the chat's domain with the property ID, the visitor identifier if there is one, the consent value and the mode (bubble or inline). Like any request, it also carries the visitor's IP address. The answer tells it whether to show the teaser. If no answer comes within two seconds, the loader shows the chat with the teaser as normal.
For your cookie policy#
You can describe the assistant's storage like this, adjusted to your own policy:
hfx-visitor) used to count chat visits. It contains nothing about you.