Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi, iam trying to implemnt new cookies banner with Customer privacy setting in hydrogen, I could not find any docs how to implement these changes.
Thanks for any tips !
Solved! Go to the solution
This is an accepted solution.
Hey, I got it working! Happy to share how I did it, hopefully it solves it for you too:
I think, just like me, you upgraded from an older version of Shopify Hydrogen to a newer one. The steps provided in the main article for the Shopify consent banner (https://shopify.dev/docs/storefronts/headless/hydrogen/analytics/consent) applies if you are using the latest version from the start. If you upgraded to the latest version, you need to do extra steps. The extra steps are in the same section under the Event Tracking article (https://shopify.dev/docs/storefronts/headless/hydrogen/analytics/tracking?framework=hydrogen&extensi...).
Just do whatever it says there (probably only the root.tsx changes are necessary) and you should be able to see the banner, assuming you did everything else correctly.
Hi @obinecko, you can try follow this example: https://github.com/Shopify/hydrogen/tree/main/examples/gtm#1-enable-customer-privacy--cookie-consent...
Thanks for extremply fast response, i was wondering if this could be cause by the theme, iam using hydrogen redirect theme.
Becuase after the implementation of changes, the banner still wont show up
The Hydrogen redirect theme won't take any effect there. Did you add PUBLIC_STORE_DOMAIN & PUBLIC_STORE_DOMAIN to your Hydrogen storefront environment variables?
Hey there! I am facing a similar issue. I did set up the environment variables but for me the banner still does not appear after following the documentation. Do you have any further hints? Thank you!
Hi, sadly i didnt solve this issue yet, ihave implement CMS, added variables and everything but the consent banner never showed, no matter what I tried. I would have to solve this later, I also checked github repos with examples I have the same code structure as the examples but still no luck 😕
hopefully you can find the solution, and if you do dont forget to let me know please.
thanks
This is an accepted solution.
Hey, I got it working! Happy to share how I did it, hopefully it solves it for you too:
I think, just like me, you upgraded from an older version of Shopify Hydrogen to a newer one. The steps provided in the main article for the Shopify consent banner (https://shopify.dev/docs/storefronts/headless/hydrogen/analytics/consent) applies if you are using the latest version from the start. If you upgraded to the latest version, you need to do extra steps. The extra steps are in the same section under the Event Tracking article (https://shopify.dev/docs/storefronts/headless/hydrogen/analytics/tracking?framework=hydrogen&extensi...).
Just do whatever it says there (probably only the root.tsx changes are necessary) and you should be able to see the banner, assuming you did everything else correctly.
wow good job mate !!!
thank you for very clear info will take a look , and hopefully make it work also !
keep up the good job