Magento cookie consent, added through your theme.
Add the CookieHub implementation code to your Magento theme’s HTML Head to hold back supported non-essential scripts until consent, show a customizable cookie banner and keep records of visitor consent where consent records are enabled on your plan. No Magento module required.
- Custom code — no Magento module
- Added in your theme’s HTML Head
- Works with storefront themes and custom layouts
Why use CookieHub with Magento.
Magento stores load scripts from many extensions, themes and integrations — marketing tools, analytics, personalization engines and other third-party services — and each of them can set cookies before a visitor has made a choice. Handling consent by hand is inconsistent and error-prone.
CookieHub adds a structured, automated consent layer to Magento. You add the implementation code to your theme once, and CookieHub then handles consent choices, blocking of supported scripts and, where enabled, consent records from that point forward. Scripts it doesn’t recognize may need additional configuration.
Block cookies before consent
Supported non-essential tracking scripts — including those added by third-party Magento extensions — are held back until the visitor actively consents. Others may need additional configuration.
Theme-level implementation
CookieHub is added as custom code in your theme’s HTML Head. There is no Magento module to install and no backend modification to make.
Built for Magento storefronts
Works with Magento storefront themes and custom layouts, with consent for your store’s tracking scripts managed centrally.
Added in your theme’s HTML Head. No module required.
CookieHub does not use a Magento extension or module. You paste the CookieHub implementation code into the Scripts and Style Sheets field of your theme’s HTML Head configuration, and it loads on your storefront. Once it is in place, CookieHub:
- holds back supported non-essential scripts until consent is given
- shows your cookie consent banner to visitors
- manages visitor consent preferences
- records consent decisions in a consent log, where consent records are enabled on your plan
- provides a cookie declaration that scan results help you keep in step with your store
Make sure the domain in your CookieHub dashboard matches your Magento storefront domain, so consent can be stored correctly.
Magento installation guideCookie consent tools for your Magento store.
Automatic cookie blocking
Supported analytics, marketing and personalization scripts only run once the visitor has consented — important for stores whose extensions inject scripts outside your control. Others may need additional configuration.
Cookie scanner
Detect and categorize the cookies set by Magento extensions, themes and integrations, so your consent categories stay accurate.
Customizable cookie banner
Adjust the banner’s colors, text, behavior and layout so the consent experience matches your store’s branding.
Consent categories
Decide which cookies are necessary, analytics or marketing. CookieHub applies those categories automatically on every page.
Consent logging
Keep an audit trail of visitor consent decisions with CookieHub’s consent log, where consent records are enabled on your plan.
Dynamic cookie declaration
A cookie declaration ready to embed in any Magento CMS page. Cookie scan results help you review it and keep it in line with the cookies your store uses.
Add CookieHub to Magento in a few steps.
Everything happens in the Magento admin panel: no module installation, no backend modification, no code-heavy customization.
- 01
Get your implementation code
In the CookieHub dashboard, copy the CookieHub implementation code for your store’s domain.
- 02
Open Magento admin
Log in to your Magento store’s admin panel.
- 03
Go to Content → Configuration
In the left-hand menu, choose Content, then Configuration.
Content › Configuration - 04
Edit your theme configuration
Choose the scope you want to change, such as the default store view, and click Edit for your theme.
- 05
Open HTML Head
In the theme configuration, open the HTML Head section.
HTML Head - 06
Add the code
Paste the CookieHub implementation code into the Scripts and Style Sheets field, so it loads immediately after the opening head tag.
Scripts and Style Sheets - 07
Save the configuration
Save your changes. CookieHub then manages supported third-party tracking scripts on your storefront automatically.
Already using Google Tag Manager?
If your Magento store manages tags through Google Tag Manager, install CookieHub through GTM rather than adding a second implementation in your theme.
View Google Tag Manager setupAdd a cookie declaration page
CookieHub generates a dynamic cookie declaration you can embed in any Magento CMS page, so visitors can see which cookies your store uses.
Learn about the cookie declaration
Magento questions, answered.
No. CookieHub is installed with custom code: you add the CookieHub implementation code to your theme’s HTML Head in the Magento admin. No module or extension installation is required.
In the Magento admin, go to Content → Configuration, choose the scope (for example the default store view) and click Edit for your theme. Open HTML Head, paste the implementation code into the Scripts and Style Sheets field and save the configuration.
CookieHub’s automatic cookie blocker holds back supported services until the visitor gives consent, including those loaded by third-party Magento extensions. Scripts it doesn’t recognize may need additional configuration, such as manual consent tagging.
CookieHub is designed to load early in the page lifecycle, before scripts that may set cookies. The implementation code should be placed near the top of the <head>, and async or defer should not be added to the CookieHub script. Categorize the cookies your checkout and sessions need as necessary, so they aren’t blocked, and test your checkout after setup, as extensions and themes vary.
Yes. Because CookieHub is added at theme level, it works with Magento 2 Open Source, Magento 2 Commerce (Adobe Commerce) in the cloud or on-premise, and custom storefront themes.
Yes. You can customize the banner’s colors, text, behavior and layout so the consent experience blends with your brand.
Yes. CookieHub generates a dynamic cookie declaration that you can embed in any Magento CMS page. Cookie scan results help you review and maintain it as the cookies your store uses change.
CookieHub provides tools that help Magento store owners meet consent requirements under privacy laws such as GDPR and CCPA: holding back supported non-essential scripts until consent, recording consent decisions where consent records are enabled, and helping you keep a cookie declaration up to date.
Start managing cookie consent on your Magento store.
Add the CookieHub implementation code to your theme’s HTML Head and let CookieHub handle consent choices, blocking of supported scripts and, where enabled, consent records across your storefront.