ARTICLE

Hyva and Google Consent Mode v2 on Magento: Cookie Banners, GTM, and Analytics After Migration

Hyva and Google Consent Mode v2 on Magento: Cookie Banners, GTM, and Analytics After Migration

Google Consent Mode v2 requires your Magento store to tell Google whether a shopper has consented across four signals (analytics_storage, ad_storage, ad_user_data, and ad_personalization) before Google Analytics and Google Ads tags collect data. On a Hyva theme the hard part is timing: Hyva defers external scripts and serves cached pages, so the default “denied” state has to load before Google Tag Manager, and the consent banner has to render under full page cache.

If you migrated to Hyva and your Google Ads remarketing audiences quietly stopped growing, or GA4 conversions look thin from EEA traffic, a broken or missing Consent Mode v2 setup is a prime suspect. Google added the two new v2 parameters in November 2023 and began enforcing them for advertisers using its audience features in the European Economic Area in March 2024. Miss them, and Google stops accepting remarketing and personalization data from consented users. This guide, from Bemeir, the first US-based official Hyva Gold Partner, covers what v2 requires, why a Hyva frontend changes the implementation, and how to ship it correctly.

What Consent Mode v2 actually requires

Consent Mode is the framework Google uses to adjust how its tags behave based on a user’s consent choices. Version 2 kept the original two signals and added two more. Per Google’s consent mode documentation, the parameters are:

  • analytics_storage: consent for analytics storage, such as GA4 measurement.
  • ad_storage: consent for advertising cookies and storage.
  • ad_user_data: consent to send user data to Google for advertising. New in v2.
  • ad_personalization: consent to use data for personalized advertising, such as remarketing. New in v2.

Two granular states, functionality_storage and personalization_storage, plus security_storage, round out the model. The behavioral rule that matters: for EEA and UK visitors you set every non-essential signal to denied by default, before any Google tag runs, then update the signals to granted only after the shopper accepts. If you serve Google Ads audiences or personalization to European users and do not send ad_user_data and ad_personalization, Google will not build remarketing audiences from that traffic. This is not a soft recommendation. It is the gate on whether your European advertising data flows at all.

Basic vs Advanced Consent Mode

Consent Mode ships in two implementation styles, and the choice affects both your data quality and your compliance posture. Pick deliberately.

Basic Consent Mode Advanced Consent Mode
When tags load Blocked entirely until the shopper consents Loaded on page load in a denied state
Before consent No data sent to Google at all Cookieless pings sent (no identifiers)
Data recovery None for non-consenters Google fills gaps with conversion and behavioral modeling
Data volume Lower Higher, because modeling recovers some signal
Strictest privacy reading Stronger, nothing fires pre-consent Weaker, pings fire pre-consent

Advanced mode usually gives better measurement because Google models the behavior of users who decline, but it does send cookieless pings before consent, which some legal teams will not accept. Basic mode is the more conservative reading of consent law. The right answer depends on your legal guidance, not on which produces prettier dashboards, so confirm the choice with whoever owns privacy compliance before you build.

Why Hyva changes the implementation

On a Luma store, consent and tag management are usually bolted on with a cookie extension and a GTM snippet in the head, and the theme does not fight you. Hyva is different in two ways that directly affect Consent Mode, and both trace back to how Hyva earns its speed.

Hyva defers external scripts. The theme dispatches an init-external-scripts event on the first user interaction so analytics and marketing tags do not block the main thread during render. That is excellent for performance, and it is the same mechanism we describe in our guide to reducing Magento INP on a Hyva storefront. But Consent Mode has a strict ordering requirement: the default denied state must be set before GTM or gtag loads. If your deferral logic delays the default consent call along with the tags, you can end up firing GTM before the default state is registered, which breaks the model. The default consent command and the tag loading are two different things, and only the tags should be deferred.

Hyva serves full page cache. Category and product pages are cached and served to many shoppers, so anything that must appear on them cannot be rendered per-user on the server. The consent banner therefore has to be handled client-side, and it has to work on a cached page for a first-time visitor who has not yet made a choice. A CMP that assumes server-side rendering of the banner will misbehave under Hyva’s full page cache.

The practical consequence is that you cannot simply reuse a Luma consent setup. You need a CMP built or adapted for Hyva, and you need to place the default consent state carefully relative to Hyva’s script deferral.

A Hyva-safe implementation checklist

Ship the setup in this order. Each step depends on the one before it.

  1. Set the default consent state first, and do not defer it. Emit the gtag('consent', 'default', {...}) call with every non-essential signal set to denied for EEA and UK, and make sure it runs before GTM initializes. Keep it out of the init-external-scripts deferral.
  2. Load GTM through Hyva’s deferral. The GTM container and the downstream analytics and ads tags are what you defer to the first interaction, not the consent default.
  3. Configure default consent states in GTM. In the container’s consent settings, mark each tag with the consent types it requires so tags respect analytics_storage, ad_storage, ad_user_data, and ad_personalization. The mgt-commerce Magento Consent Mode v2 setup guide walks through the GTM container steps in detail.
  4. Wire the banner to update consent. On accept, call gtag('consent', 'update', {...}) to flip the granted signals. On reject, leave them denied. Persist the choice so returning shoppers are not re-prompted.
  5. Verify under full page cache. Test as a fresh visitor on a cached category page, not just on an uncached admin preview, because that is where banner rendering breaks.
  6. Validate the signals reach Google. Use GTM preview and the browser network tab to confirm all four parameters are present and that they flip from denied to granted on consent.

Choosing a Hyva-compatible CMP

Do not assume a generic Magento cookie extension will work on Hyva. Consent management platforms need explicit Hyva support, both for the banner rendering under full page cache and for the Consent Mode v2 signal wiring. A few options that advertise Hyva compatibility:

CMP option Hyva support Consent Mode v2 Notes
Amasty GDPR / Cookie Consent Via amasty/module-gdpr-cookie-hyva and amasty/module-google-consent-mode-hyva Yes Separate Hyva and Consent Mode packages; also a Microsoft UET package
PixelPerfect Hyva Cookie Consent Built for Hyva Yes Category-based consent, GTM and GA4 templates, full page cache compatible
BSS Commerce Cookie Consent Hyva compatible Yes Consent Mode v2 for ads and analytics

The PixelPerfect Hyva cookie consent module is a useful reference for what a Hyva-native implementation looks like: it handles consent client-side so it works with full page cache, ships category-based consent for Necessary, Analytics, Marketing, and Preferences, and includes built-in templates so GTM and GA4 respect the consent choice automatically. Whichever you choose, the two non-negotiables are full page cache compatibility and correct Consent Mode v2 signal handling.

Common Hyva consent mistakes

These are the failures we see most often on Hyva stores after a migration:

  • The default state fires after GTM. The single most common break. The denied default gets swept into the script deferral and runs too late, so GTM initializes without a registered default and Consent Mode never engages properly.
  • Only v1 signals are sent. The store sends ad_storage and analytics_storage but not ad_user_data and ad_personalization, so Google Ads audiences in the EEA stop growing even though the banner looks fine.
  • The banner does not render on cached pages. A server-rendered banner that works on an uncached page vanishes under full page cache, so first-time visitors see nothing and no consent is ever captured.
  • A Luma CMP is reused unchanged. It loads, but its banner markup and its tag timing assume the old theme, and it silently fails to wire the Consent Mode signals on Hyva.
  • No verification under real conditions. The setup is tested logged-in as admin, where caching and deferral behave differently than for an anonymous shopper.

FAQ

What is the difference between Consent Mode v1 and v2?

Consent Mode v1 used two signals, ad_storage and analytics_storage. Version 2, introduced in November 2023, added ad_user_data and ad_personalization. Google began enforcing the new signals for advertisers using its audience features in the European Economic Area in March 2024. Without them, Google stops accepting remarketing and personalization data from EEA users.

Does Consent Mode v2 apply to US-only Magento stores?

Consent Mode v2 enforcement is tied to serving EEA and UK users with Google’s audience and personalization features. A store with no European traffic and no European ad targeting is less exposed, but if you run Google Ads audiences or expect any EEA visitors, implementing v2 is the safe default. It also future-proofs the store as US state privacy laws expand.

Do I need a special cookie consent extension for Hyva?

Usually yes. Hyva renders banners client-side and serves full page cache, so a consent platform needs explicit Hyva support to display correctly and to wire the Consent Mode v2 signals. Extensions with dedicated Hyva packages, such as the Amasty Hyva modules or a Hyva-native module, are the reliable path.

Should I use Basic or Advanced Consent Mode?

Basic mode blocks all Google tags until the shopper consents, which is the more conservative privacy reading. Advanced mode loads tags in a denied state and sends cookieless pings so Google can model the behavior of users who decline, which recovers more measurement but fires before consent. Choose based on your legal team’s guidance.

Why did my analytics drop after migrating to Hyva?

A frequent cause is that the Consent Mode default state now fires after GTM because of Hyva’s script deferral, or that the old Luma consent extension no longer wires the signals correctly. Verify the default denied call runs before GTM and that all four v2 parameters reach Google.

Getting consent right without losing speed

Consent Mode v2 and Hyva are both about control: v2 controls what data Google may collect, and Hyva controls what runs on the main thread and when. The two intersect at exactly one point, the ordering of the default consent state relative to Hyva’s deferred scripts, and getting that ordering right is most of the work. Add a Hyva-compatible CMP that renders under full page cache, send all four signals, and verify as a real anonymous shopper, and you keep both your compliance posture and the speed you migrated for.

Bemeir handles this analytics and consent layer as part of Magento and Adobe Commerce engagements, working as an extension of your team, and we bring the same care to Shopify and Shopify Plus, Shopware, and BigCommerce stores when a merchant runs one of those platforms. Our deep technology partner ecosystem means we can match the right CMP and tag setup to your stack, and you can read more about how we work if that matters to you. If your Hyva store’s analytics or ad audiences fell off after migration, talk to Bemeir and we will audit the consent and tag layer end to end.

Let us help you get started on a project with Hyva and Google Consent Mode v2 on Magento: Cookie Banners, GTM, and Analytics After Migration and leverage our partnership to your fullest advantage. Fill out the contact form below to get started.

more articles about ecommerce

Read on the latest with Shopify, Magento, eCommerce topics and more.