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.

Use either of these. If both are present, the attribute wins.

On the script tag#

HTML
<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>

Set window.hfxConsent to "granted" or "denied" before the loader script runs:

HTML
<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#

ValueVisitor identifier
grantedCreated if missing and stored in the page's local storage as hfx-visitor. Sent with the page view and the conversation.
deniedNot read, not created and not sent. The visitor is never placed in a measurement holdout.
Not set, or any other valueThe 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.

KeyValuePurposeNeeds consent
hfx-visitor24 random hexadecimal charactersCounts visits and measures how the assistant performs. Contains nothing about the visitor.Yes
hfx-teaser-dismissed:<property ID>1Remembers 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.

KeyValuePurposeNeeds consent
hfx-chat:<property ID>A conversation token and the time it was savedLets 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.

You can describe the assistant's storage like this, adjusted to your own policy:

The booking assistant stores a conversation token so your chat continues if you reload the page, and remembers if you close its welcome message. Only if you accept, it also stores a random identifier (hfx-visitor) used to count chat visits. It contains nothing about you.
Book a 20-minute call