Hi there javier bilbao , thank you for submitting to our Ucraft Forum!
For a cookie solution, you'll need to embed an HTML code you get from a Cookie-Script website of your choice to your Ucraft website through the Custom HTML element or Code Injection section found in the Site Settings APP.
Both tools are available on the paid plans and to have the codes active you'll need to connect a custom domain to your website.
Including a cookie consent script for opt-in/opt-out functionality is indeed important for websites that need to comply with the General Data Protection Regulation (GDPR) and other privacy regulations in the EU. Here's how you might approach this in the context of a free package:
1. Open Source Cookie Consent Libraries: Many open-source cookie consent libraries are available that allow you to easily implement cookie consent banners on your website. Some popular options include "CookieConsent" by Osano and "cookie-banner" by Silktide. These libraries usually provide customizable banners that users can interact with to give their consent.
2. Package Integrations: Since you're using a free package, you can look for ways to integrate these open-source libraries into your application. Most of these libraries provide clear documentation and guides for integration.
3. Adding the Script: To integrate the script, you'll need to include it in your website's HTML. You might place it just before the closing `</body>` tag to ensure that it loads after the rest of your content. The script will then display the cookie consent banner based on the user's preferences.
4. Customization: Many of these libraries allow you to customize the appearance of the consent banner to match your website's design. You can usually adjust the content, colors, position, and behavior of the banner.
5. Handling Opt-in/Opt-out: Once the consent banner is set up, the library should handle the opt-in/opt-out functionality. Users who opt-in can have their preferences stored, and cookies can be set or removed accordingly.
7. Testing: Always thoroughly test the implementation to ensure that the consent banner works as expected on different devices, browsers, and screen sizes.
8. Accessibility: Make sure the consent banner is accessible to all users, including those with disabilities.