Cookies and consent
Do Rek.ai set cookies?
No, Rek.ai does not set cookies. Instead, the script uses local and session storage in the browser to follow the visitor's journey and what they've shown interest in, so it can give more relevant recommendations.
Is consent required?
Storage that's necessary for a website to function usually doesn't require active consent under GDPR and the ePrivacy Directive, only storage used for tracking, analytics or advertising does. Rek.ai's storage only powers recommendations on your own site, which is why most customers simply let it run without adding a consent category.
In practice, we treat this as necessary functionality rather than analytics, since it directly improves the site- around 95% of our customers categorize Rek.ai as necessary. Each project and customer can of course make their own assessment.
If you decide it isn't necessary for your site, the same options apply as below: without local and session storage, Rek.ai still works, but it can no longer tell which page a visitor came from.
The rule: non-necessary storage in local storage must wait for consent and be listed in your cookie policy, so it comes down to what you consider "necessary."
If you want to require consent
Does Rek.ai work without local and session storage? Yes, Rek.ai keeps giving recommendations, it just can't recognize returning visitors, so the model loses about 20% of its accuracy.
Some organizations prefer to treat Rek.ai's storage the same way as analytics cookies. Rek.ai supports this in two ways:
1. Tie storage to your consent tool
Add data-useconsent="true" to the script tag, then set the consent flag based on the visitor's actual choice:
<script src="https://static.rekai.se/YOUR_SCRIPT_ID.js" data-useconsent="true" defer></script>window.__rekai = window.__rekai || {};
window.__rekai.consentaccepted = false; // set to true once consent is givenCookiebot: if you use Cookiebot and want Rek.ai to hold off storing data until the visitor accepts "Statistic cookies" add data-useconsent="true" when loading the script, exactly as shown above.
2. Block usage of local storage and session storage
To stop Rek.ai from writing to the browser at all, add this wherever the script loads:
<script>
window.__rekai = window.__rekai || {};
// Block save to session storage
window.__rekai.blockSaveToSessionStorage = true;
// Block save to local storage
window.__rekai.blockSaveToLocalStorage = true;
</script>Cleanup of data saved in session and local storage
To remove anything Rek.ai has already stored, call:
window.__rekai.removeLocalAndSessionStorage();Troubleshooting
If you've placed the Rek.ai script inside a consent tool's Statistics or Analytics category, for example, Sitevision's built-in cookie module, Cookiebot or OneTrust- the tool itself will often stop the script from running at all until a visitor accepts that category, for example by loading it as type="text/plain" and only rewriting it to executable JavaScript once consent is given.
If that's the case, data-useconsent and the window.__rekai flags never get a chance to run, because the script hasn't executed yet. Visitors who haven't consented get no recommendations at all- not the reduced-accuracy version described above.
To fix this, keep two things separate:
- Declaring Rek.ai in your cookie policy or consent banner, so visitors know it's used — this can stay under Statistics/Analytics for transparency.
- Loading the script tag itself, this should not go through your consent tool's automatic blocking mechanism. Load it unconditionally and use
data-useconsentpluswindow.__rekai.consentacceptedto control storage based on the visitor's actual choice instead.
If your consent tool doesn't let you separate "declared" from "blocked" that's a decision for your organization: either accept that non-consenting visitors get no recommendations, or use "Block usage of local storage and session storage" above, which removes the need for a consent gate on this script altogether.
Descriptions for consent tools
If you use a consent management tool, you'll typically need to describe each stored value to visitors. Suggested copy:
Your website uses the Rek.ai service to collect anonymous statistics in order to make page suggestions for our visitors. The anonymous statistics we have access to are time, pages visited, and information from the browser.
| Name | Identifier | Description | Description SE | Retention |
|---|---|---|---|---|
| Pages in session | sp[projectid] | Pages visited in this session | Sidor som besöktes under denna session | Deleted after session is closed |
| Last page | last[projectid] | Last page visited in this session | Senast besökta sidan i denna session | Deleted after session is closed |
| Orgreferrer | rekOrgRef | Original referrer address for this session | Ursprunglig referensadress för denna session | Deleted after session is closed |
| Session time | sessionstarttime | Date object for when session began | Datumobjekt för när sessionen började | Deleted after session is closed |
| Tabs in session | rektabs | Array of "section pages" the user has visited in the current session | Lista med "sektionssidor" som användaren har besökt under den aktuella sessionen | Deleted after session is closed |
| Dates | vds[projectid] | Array of dates the browser visited the site | Lista med datum som webbläsaren besökte webbplatsen | Saved in local storage over time |
| A setting | rekai_consent_accepted | A setting for accepted consent via a consent tool | Om ni använder ett consent-verktyg | — |