loupsio

Cookie banner and session replay: the texts to show, the code to add

By the Loupsio team · updated on · 7 min read

In short

A site that records sessions must say so in its cookie banner and wait for the visitor’s agreement. Since October 2026 the CNIL, the French data protection authority, has recommended a short notice specific to session replay on the first screen of the banner, on top of the title of each purpose. Recording starts after the click on “Accept”, stops when consent is withdrawn, and “Refuse” must be as easy as “Accept”.

What the banner must contain

The CNIL recommendation on session replay tools, adopted on 8 October 2026, asks for three levels of information:

WhereWhat
First level of the bannerA short title for each purpose
First level of the bannerA short notice, separate from the purposes, saying that the site uses session replay
Second level (“Customise”)The detailed description of each purpose, the vendor, the retention period

The rules that apply to all trackers come on top: a “Refuse” button as visible as “Accept”, no recording before the choice, and a way to withdraw consent at any time. The CNIL recommends keeping the visitor’s choice for six months, then asking again.

Our guide Session replay and the CNIL sums up the whole recommendation.

Texts to adapt

These texts are starting points. Adapt them to what your site really does and have them reviewed by your lawyer or data protection officer. The CNIL’s wordings are in French; they are translated here.

Purpose title (first level)

The CNIL suggests this wording for user experience improvement:

[Publisher’s name] records and views your actions while you browse to identify the difficulties you meet and improve the navigation and usability of the site [or the app].

And this one for detecting technical errors:

[Publisher’s name] records and views your actions while you browse to solve any technical problems.

Notice specific to session replay (first level)

The CNIL gives no wording. An example:

This site uses a session replay tool: with your agreement, your browsing (pages seen, clicks, scrolling) is recorded and can be viewed again. What you type in forms is never sent. [Learn more]

Description (second level)

Recording your browsing on this site (pages seen, clicks, mouse movements, scrolling, page content as displayed, use of forms, technical errors) to spot difficulties and improve the site. What you type in forms is masked in your browser and never sent. Vendor: [name], processor for [shop name]. Data hosted in the European Union and kept for [period].

The sentence about typed input is only true if your tool masks fields in the browser. Check before writing it. The full template adds the paragraph for the privacy policy and the list of what Loupsio keeps in the browser.

Tying the banner to the tool

The principle is the same with every tool: the script waits, and your consent manager passes on the visitor’s choice. With Loupsio, it takes two steps.

Install the script in consent mode, in the <head> of every page:

<script>window.loupsio = window.loupsio || function () { (window.loupsio.q = window.loupsio.q || []).push(arguments); };</script>
<script async src="https://your-server/loupsio.js" data-site="s-xxxxxxxxxx" data-consent="required"></script>

Then call Loupsio from your banner:

// When the visitor accepts, and on every page if their agreement is already stored:
loupsio('consent', true);

// When they refuse, or withdraw their agreement:
loupsio('consent', false);

Loupsio does not remember the choice: your consent manager keeps it and calls loupsio('consent', true) again on every page. Before that call, nothing is recorded or sent, and no survey shows.

On Shopify, the app follows the shop’s banner: Loupsio only records visitors who accepted analytics.

ToolWhere to declare the session replay tool
AxeptioAs a service, in a measurement or analytics purpose
DidomiAs a custom vendor, attached to a “Session analysis” purpose
CookiebotIn the “Statistics” category
ShopifyRecording falls under analytics in the Customer Privacy API

In every case, do not file the tool under “strictly necessary” trackers, and use the callback mechanism documented by your consent manager to call the right line on acceptance, on refusal and when each page loads.

Checking in five minutes

  1. Open your shop in a private browsing window.
  2. Refuse, then browse a few pages. No session must appear in the tool.
  3. Open a new private window and accept. The session must appear shortly after.
  4. Change page: recording continues without asking again.
  5. Withdraw your agreement from the cookie settings: recording stops.

Common mistakes

  • Filing session replay under “Statistics” without naming it. The CNIL asks for a dedicated notice on the first level.
  • Believing a cookieless tool escapes the banner. The rule covers anything read or written in the browser.
  • Loading the tool before the choice. The script must record nothing until the visitor has accepted.
  • Forgetting withdrawal. The “Manage my cookies” link must stop recording, not just close the banner.
  • Forgetting page text. Typed input is masked, but a name or an address displayed on a “My account” page is recorded if it is not masked. Mask those areas or exclude those pages.

Frequently asked questions

Can sessions be recorded without a cookie banner?

Not in France. The CNIL considers that session replay needs the visitor’s prior consent, and the exemption that exists for audience measurement does not apply.

Does session replay need its own line in the banner?

The CNIL recommends a short notice specific to session replay on the first level, presented apart from the purposes, with a description that is easy to find.

How long should the visitor’s choice be kept?

The CNIL recommends six months, for an agreement as for a refusal. After that, the banner asks again.

What happens if many visitors refuse?

You record fewer sessions. Frictions remain visible: a bug that affects visitors also affects those who accepted. Totals, however, only cover recorded visits.

Sources

Read next

Paste one line and your first report arrives on Monday.