Cookie Consent pop up not showing up on Astro.js Project

1k Views Asked by At

Cookie Consent not showing up on my website: https://mytopcountries.web.app/

`

document.addEventListener('DOMContentLoaded', function () { cookieconsent.run({"notice_banner_type":"simple","consent_type":"express","palette":"light","language":"en","page_load_consent_levels":["strictly-necessary"],"notice_banner_reject_button_hide":false,"preferences_center_close_button_hide":false,"page_refresh_confirmation_buttons":false,"website_name":"uspekhi","website_privacy_policy_url":"https://uspekhi.web.app/"}); });

Free cookie consent management tool by TermsFeed Policy Generator

`

I have created an index.html file in the public folder enter image description here

I have deployed the website on Firebase, and addded Cookie Consent by TermsFeed https://www.TermsFeed.com on index.html in the public folder, however it does not pop up on the live page: https://mytopcountries.web.app/

1

There are 1 best solutions below

0
molnargabor On

You should not place index.html into /public folder. It is for your non-code, unprocessed assets (fonts, icons, etc.).

Astro uses /src folder for the project files.

Docs: https://docs.astro.build/en/core-concepts/project-structure/