Features Pricing GDPR cookie banner Google Consent Mode v2 WordPress plugin Cookiebot alternative For Agencies GDPR ePrivacy About Contact
RO | EN
Start Free →
Necessary

hs_ab_test Cookie (HubSpot) – What It Is & Does

hs_ab_test is a session cookie set by HubSpot to ensure a visitor consistently sees the same variant of an A/B test running on a page during their visit. HubSpot treats it as strictly necessary for the correct operation of active A/B tests.

Name
hs_ab_test
Provider
HubSpot
Category
Necessary
Type
HTTP cookie
Lifetime
Session
Consent
No, but it must be listed in the cookie policy

What is the hs_ab_test cookie?

hs_ab_test is a session-based HTTP cookie set by HubSpot, a marketing, sales, and CMS platform widely used for landing pages, forms, and personalized content.

It appears when a page built or hosted through HubSpot is running an active A/B test (for example, two versions of a landing page). The cookie is created by the HubSpot script on the first load of the tested page, regardless of whether the visitor interacts with any forms or marketing content.

What data it stores

The cookie typically stores an identifier for the A/B test variant assigned to the visitor, so the same version of the page is shown consistently throughout the current browsing session. It does not contain personal data such as name, email, or phone number.

The exact value format is not publicly documented by HubSpot and may vary depending on the test configuration. Data is sent to HubSpot's infrastructure, which may process information on servers located in the EU or the US depending on the customer's account.

What it is used for

The cookie's purpose is purely technical: it keeps the A/B testing experience consistent for a visitor within a single browsing session, preventing the same person from seeing alternating page variants on successive reloads.

For the site owner, this cookie enables reliable A/B testing in HubSpot, with results informing decisions about page content or layout.

Does it require consent?

CookieFix classifies hs_ab_test as strictly necessary, since its role is limited to the correct functioning of the active A/B test on the page, with no cross-site tracking or advertising component.

  • Strictly necessary cookies do not require prior consent under Article 5 of the ePrivacy Directive (transposed in Romania via Law 506/2004).
  • Site owners must still disclose it in their cookie policy, along with its purpose and provider (HubSpot).
  • If the site uses other HubSpot cookies for marketing or analytics, those remain subject to GDPR consent requirements.

How to block or delete hs_ab_test

A visitor can delete or block hs_ab_test through browser settings (Chrome, Firefox, Edge, Safari) under per-site cookie management, or by browsing in private/incognito mode.

Site owners can control the loading of HubSpot scripts through a CMP such as CookieFix, which automatically blocks third-party scripts until the visitor makes a choice in the consent banner, even though this specific cookie is categorized as strictly necessary and may remain active for the testing functionality.

Frequently asked questions

No, it is classified as strictly necessary because it supports the operation of an active A/B test on the page, so it falls outside the prior consent requirement under Law 506/2004.

It is set by HubSpot, the marketing and CMS platform, whenever a page shown to the visitor is running an active A/B test.

It is a session cookie, so it is automatically deleted when the browser is closed.

The visitor may see inconsistent A/B test variants when reloading the page, but overall site browsing is not affected.

Updated 7 September 2026 · Information comes from the provider’s public documentation and CookieFix scans; it is not legal advice.