What is the _hjIncludedInPageviewSample cookie?
_hjIncludedInPageviewSample is an HTTP cookie set by the Hotjar tracking script, a behavioral analytics tool (heatmaps, session recordings, funnels) used by many site owners to understand how visitors interact with pages.
The cookie appears as soon as the Hotjar script loads on a page and a visitor triggers a pageview, functioning as part of the internal mechanism Hotjar uses to decide whether that session is counted in the traffic data sample.
What data it stores
The cookie stores a simple boolean-type value (such as 0/1) indicating whether the current visit is part of the pageview sample Hotjar uses for its calculations. It does not contain directly identifying data such as a name or email address.
The value is read by the Hotjar script running in the visitor's browser and sent to Hotjar's servers to aggregate site-wide traffic statistics.
What it is used for
The purpose of this cookie is purely statistical: it helps Hotjar determine, at session level, whether the current pageview should be included in the sample used for traffic and behavior reports.
For the site owner, this mechanism contributes to accurate reporting on how visitors navigate through pages, without serving any marketing or advertising purpose.
Does it require consent?
Under CookieFix's classification, _hjIncludedInPageviewSample falls under the statistics (analytics) category. Since it is used for traffic measurement rather than strictly necessary site functionality, it requires the visitor's prior consent under the ePrivacy Directive (2002/58/EC, transposed in Romania via Law 506/2004) and the GDPR (Regulation 2016/679).
- The site owner must disclose this cookie in the cookie policy, under the statistics category.
- The Hotjar script should not load before the visitor consents to the statistics category.
- Refusing consent must not block access to the site's content.
How to block or delete _hjIncludedInPageviewSample
A visitor can delete or block this cookie at any time from browser settings (Chrome, Firefox, Edge, Safari – per-site cookie management), or by using anti-tracking browser extensions that block Hotjar scripts.
At the site level, a CMP such as CookieFix can automatically block the Hotjar script from loading until the visitor accepts the statistics category, preventing this cookie from being set without valid consent.
Frequently asked questions
It's a technical cookie set by Hotjar to flag whether the current visit is included in the pageview sample used for its statistical analysis.
Its typical duration is only 2 minutes, making it a very short-lived cookie tied to the current browsing session.
Yes, since it's classified as an analytics cookie, it requires the visitor's prior consent before being set.
You can use a CMP that automatically blocks the Hotjar script until the visitor consents to the statistics category.