Cookies and consent

Cookies and consent

⚠️ Always load the Rek.ai script, no matter what the visitor chooses in your cookie banner

The Rek.ai script must be loaded on every page, for every visitor. Never let your cookie banner or consent tool block it. If the script is blocked, Rek.ai stops working for everyone who declines cookies or hasn't made a choice yet. If you want to require consent, require it for the storage, not for the script.

At a glance

Needs consent?What to do
Loading the Rek.ai scriptNoAlways load it on every page, for every visitor. Don't let your consent tool block it. See Troubleshooting.
Storing data in the browser (session and local storage)Your organization decides. About 95% of our customers say no.No consent: nothing more to do.
Consent: use Option 1 or Option 2.
Listing Rek.ai in your cookie policy–Required if you need consent for the storage, optional otherwise. Listing Rek.ai is not the same as letting the consent tool block the script. See Descriptions for consent tools.

Does Rek.ai use cookies?

No. Rek.ai doesn't set any cookies.

Rek.ai uses the browser's session storage to remember which pages the visitor has looked at in the current tab. This makes the recommendations more relevant.

  • Session storage belongs to a single browser tab and is deleted when the visitor closes the tab.
  • Local storage is only used by projects that have chosen to keep the browsing path between visits or to save custom values (custom features), and for remembering consent in some setups. Rek.ai no longer keeps any visit history between visits.

You can see everything that is stored in Stored values below.

Changed in November 2026: We removed three storage values (vds[projectid], sessionstarttime and last[projectid]), including the only one that kept visit history between visits. Read more in Changes to Storage Nov 2026.

What data does Rek.ai handle?

Rek.ai is built to work without knowing who the visitor is.

  • No identity. Rek.ai doesn't know who the visitor is or whether they are logged in. It cannot link page views to a specific person.
  • No personal data is collected automatically. Rek.ai only receives what the script sends, such as which page is being viewed and anonymous information about the visit.
  • You control what is sent. Personal data can only reach Rek.ai if your website's own code sends it. Never send names, e-mail addresses, user IDs or similar to Rek.ai. We are happy to review your setup with you during implementation.

Is consent required?

Under GDPR and the ePrivacy Directive, storage that is necessary for a website to function usually doesn't require consent. Storage used for tracking, analytics or advertising does.

Rek.ai's storage is only used to power recommendations on your own website. That's why about 95% of our customers classify Rek.ai as necessary and let it run without a consent category. Each organization makes its own assessment.

The rule: If you classify the storage as not necessary, it must wait for the visitor's consent, and Rek.ai must be listed in your cookie policy. You can use the descriptions for consent tools below.

How does storage affect the recommendations?


Rek.ai recommendations without session storage
Rek.ai recommendations with session storage

If you want to require consent

Rek.ai keeps working without session and local storage. It just can't follow the visit, so the recommendations become about 20% less accurate.

Choose one of the two options below. In both options, the script is still loaded for every visitor. Only the storage changes.

Option 1: Store data only after consent

Use this option if you want Rek.ai to store data for visitors who accept, but not for visitors who decline.

Step 1. Add data-useconsent="true" to the script tag:

<script src="https://static.rekai.se/YOUR_SCRIPT_ID.js" data-useconsent="true" defer></script>

The script loads as usual, but Rek.ai doesn't store anything about the visit until the visitor gives consent.

Step 2. Tell Rek.ai what the visitor chose. Set the value to true when the visitor gives consent:

window.__rekai = window.__rekai || {};
window.__rekai.consentaccepted = false; // set to true once consent is given

Using Cookiebot? If you want Rek.ai to wait with storing data until the visitor accepts "Statistic cookies", add data-useconsent="true" to the script tag, exactly as shown above.

Option 2: Never store data

Use this option if you don't want Rek.ai to store anything in the browser, for any visitor. Add this code wherever the Rek.ai 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>

Since nothing is stored, this option removes the need for consent for Rek.ai altogether.

Remove stored data

To delete everything Rek.ai has stored in the visitor's browser, for example when a visitor withdraws consent, run:

window.__rekai.removeLocalAndSessionStorage();

This also deletes any remaining values from older script versions.

Descriptions for consent tools

If you use a consent tool, you usually need to describe Rek.ai and each stored value to your visitors. Suggested text:

This website uses Rek.ai to suggest relevant pages based on what you have viewed during your visit. No cookies are used and no personal data is stored.

Stored values

NameIdentifierDescriptionDescription SERetention
Pages in sessionsp[projectid]The last pages visited in this session (at most 10)De senaste sidorna som besöktes under denna session (högst 10)Deleted after session is closed
OrgreferrerrekOrgRefThe domain the visitor came from (only the domain, never the full address)Domänen som besökaren kom från (endast domänen, aldrig hela adressen)Deleted after session is closed
Tabs in sessionrektabsArray of "section pages" the user has visited in the current sessionLista med "sektionssidor" som användaren har besökt under den aktuella sessionenDeleted after session is closed
Recommendation clickrekclickBriefly marks that the visitor clicked a recommendationMarkerar tillfälligt att besökaren klickade på en rekommendationRemoved on the next page
Keep pathonceloadedlocalOnly used by projects that have chosen to keep the browsing path between visitsAnvänds endast av projekt som valt att spara besöksvägen mellan besökDeleted after session is closed
A settingrekai_consent_acceptedRemembers that the visitor has accepted Rek.ai, for projects that use consentKommer ihåg att besökaren har godkänt Rek.ai, för projekt som använder samtyckeSession or local storage, depending on setup

Projects that keep the browsing path between visits or save custom values (custom features) also save data in local storage. This is configured per project.

vds[projectid], sessionstarttime and last[projectid] are no longer used. If your cookie policy or privacy notice lists them, you can remove them. See Changes to Storage Nov 2026.

Troubleshooting

Rek.ai stopped working after we added a cookie banner

This is the most common problem. If the Rek.ai script is placed in a consent tool's Statistics or Analytics category, the tool usually stops the script from running until the visitor accepts that category. This happens in, for example, Sitevision's built-in cookie module, Cookiebot and OneTrust. The tool often does it by loading the script as type="text/plain" and only turning it into executable JavaScript after consent.

When that happens, data-useconsent and the window.__rekai settings never get a chance to run. Visitors who haven't consented get no recommendations at all, not the slightly less accurate version described above.

How to fix it: keep these two things separate.

  • Declaring Rek.ai in your cookie policy or consent banner, so visitors know it's used. This can stay under Statistics or Analytics for transparency.
  • Loading the script. The script tag should not go through the consent tool's automatic blocking. Load it directly on the page, and use Option 1 to control storage based on the visitor's choice. If your consent tool can't load the script without blocking it, use Option 2 instead. Rek.ai then works for every visitor without needing consent. Contact us if you need help with your consent tool.

How to check that the script is loaded

  1. Go to your website and decline cookies in the banner.
  2. Open the browser's developer tools (F12, or right-click and choose Inspect).
  3. Go to the Network tab and reload the page.
  4. Search for rekai. If you can see static.rekai.se/... in the list, the script is loaded correctly.