Fix: No loads cookie politics page in Shopify (valid for other footer pages)

Tiempo de lectura: < 1 minuto

We will share a Fix that can help you solve problems with automatic URLs added by Shopify in your footer.

Cookies Pexels

In this case, it’s about the link to Cookies policy. Since the theme I installed won’t let me modify this content and automatically adds a link with this format: web/policies/#shopifyReshowConsentBanner

To solve it, you need to edit the theme manually, let’s go to Online Store > Themes > … > Edit Code

We are looking for: assets/global.js

We add this code:

// Fix for cookie policy (redirects to banner or actual page) document.addEventListener("DOMContentLoaded", function () { if (window.location.hash === "#shopifyReshowConsentBanner") { // Redirects to a cookie information page window.location.href = "/pages/politica-de-cookies"; } });

We must now create a new page called policy-de-cookies and redirect it.

Leave a Comment