Articles on: Cookie Consent

๐Ÿ”— Integrate Hoppy Cookie with Google Consent Mode V2

Connecting Google Consent Mode V2 with Hoppy Cookie allows Google services to adjust their behavior based on the consent choices made by your visitors.


Instead of completely blocking Google scripts, Consent Mode communicates consent preferences to Google Analytics, Google Ads, and Google Tag Manager, helping merchants balance privacy compliance with measurement and reporting capabilities.



โš ๏ธ Before You Begin


Before connecting Google Consent Mode V2, make sure:


  • You have at least one of the following configured:
    • Google Analytics 4 (GA4)
    • Google Ads
    • Google Tag Manager (GTM)
  • You have the required IDs ready:
    • GA4 Measurement ID (G-XXXXXXXXXX)
    • Google Ads ID (AW-XXXXXXXXXX)
    • Google Tag Manager ID (GTM-XXXXXXX)


โš ๏ธ Important:


If Google scripts are already installed through another app, sales channel, or directly inside your Shopify theme, remove those duplicate installations first. Running the same Google tag multiple times can result in inaccurate reporting and duplicate events.


๐Ÿ’ก For merchants serving GDPR visitors, enabling TCF v2.3 alongside Google Consent Mode V2 is strongly recommended.



๐Ÿ› ๏ธ Step 1 โ€” Open the Integrations Page


Inside your Shopify Admin:


โ†’ Open Hoppy GDPR EU Cookie Banner


โ†’ Click Integrations from the left-side navigation menu


Locate the Google Consent Mode V2 integration card.



โš™๏ธ Step 2 โ€” Configure the Integration


Google Consent Mode V2 supports two setup methods depending on how Google tags are currently installed on your store.



Option A โ€” Let Hoppy Load Google Tags


Choose this option if Google tags are not currently installed elsewhere.


Enter the following IDs as needed:


Google Analytics ID (GA4)


Used to connect Google Analytics 4 tracking.


Example:


G-XXXXXXXXXX



Google Ads ID


Used to connect Google Ads conversion tracking.


Example:


AW-XXXXXXXXXX



Google Tag Manager ID


Used to connect Google Tag Manager.


Example:


GTM-XXXXXXX


โš ๏ธ If a GTM ID is provided, Hoppy loads GTM only and expects GA4 and Google Ads tags to be managed inside the GTM container.


Do not install the same tag through multiple sources.



Option B โ€” Google Tags Already Exist


Choose this option if Google scripts have already been installed through:


  • Theme code
  • Google Tag Manager
  • Another Shopify app
  • A custom implementation


For this setup:


โ†’ Leave all ID fields empty


โ†’ Enable the integration


โ†’ Save your changes


Hoppy will only send consent signals to the existing dataLayer and will not inject additional Google scripts.



๐Ÿ’พ Step 3 โ€” Enable the Integration


After configuring your preferred setup:


โ†’ Toggle Integrate with Google Consent Mode V2 to ON


โ†’ Click Save


Once saved successfully:


โœ… The integration status changes to On


If the status remains Off, refresh the page and verify that the settings were saved correctly.



๐Ÿงช Step 4 โ€” Test the Integration


After saving, it's recommended to verify that consent signals are reaching Google correctly.



Browser Testing


Open your storefront in a private or incognito browser window.


Then:


โ†’ Open Developer Tools


โ†’ Open the Console


โ†’ Type:


dataLayer


Look for consent-related values similar to:


analytics_storage: "denied"
ad_storage: "denied"
ad_user_data: "denied"
ad_personalization: "denied"


After accepting cookies through the banner, these values should update according to the categories accepted by the visitor.



Google Tag Assistant


Use Google Tag Assistant to verify:


  • Consent status
  • Tag loading behavior
  • Google tag configuration


This provides a quick way to confirm that Consent Mode is functioning correctly.



GA4 DebugView


If Google Analytics 4 is connected:


โ†’ Open DebugView inside GA4


Confirm that events are arriving and respecting the expected consent state.



โš ๏ธ Common Troubleshooting


Duplicate Events or Double Tracking


This usually means Google tags are loading from multiple locations.


Check:


  • Shopify theme code
  • Other Shopify apps
  • Existing GTM containers


Only one source should load each Google tag.




Verify:


  • The integration is enabled
  • Changes were saved successfully
  • The cookie banner is published
  • No JavaScript errors are blocking execution



GTM Loads But Analytics or Ads Do Not


If a GTM ID has been entered:


  • Hoppy only loads GTM
  • GA4 and Google Ads tags must be configured inside Google Tag Manager


Open GTM and verify the required tags have been published.




Verify:


  • No other cookie consent solution is installed
  • No JavaScript errors exist on the page
  • Testing is performed in a fresh Incognito window


A hard refresh may also help clear cached behavior.



๐ŸŽ‰ Final Result


Once configured successfully:


โœ… Hoppy sends consent signals to Google services automatically


โœ… Google Analytics respects visitor consent preferences


โœ… Google Ads responds to marketing consent choices


โœ… Google Tag Manager receives consent state updates


โœ… Consent changes synchronize automatically


โœ… Your store maintains a more privacy-friendly measurement setup


Google Consent Mode V2 helps merchants maintain useful analytics and advertising insights while respecting visitor privacy choices. ๐Ÿช


Updated on: 14/07/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!