How to block third party cookies? I have EU Cookie Compliance installed on my website.
In the settings I have selected Opt-in option.
On the site front end, I only agreed to the functional cookies but there are cookies set by third party websites which are still saved.
I checked the module's issue queue and found this.
https://www.drupal.org/project/eu_cookie_compliance/issues/3109974#comment-13459494
https://www.drupal.org/project/eu_cookie_compliance/issues/3059471
It seems that this module will not block the third party cookies.
Is there any other way to do this?
There's no way for the module out-of-the-box to block cookies created by 3rd party components. That's a simple fact of life. For example, if you by some means inject the code to embed a YouTube video on your site, it'll serve YouTube cookies to visitors to that page and EU Cookie Compliance won't be able to block them. When a YouTube video is served there is a direct communication between YouTube and the browser which other components cannot interfere with.
(In the case of YouTube you can use their cookie-free domain but let's ignore that for the sake of this illustration.)
In order to allow EU Cookie Compliance to prevent YouTube videos appearing to users who haven't accepted cookies, you'll need to implement some Javascript that calls the function Drupal.eu_cookie_compliance.hasAgreed() provided by the module for this purpose and blocks YouTube by some means when they have not. Typically you'll have to alter the embedding code to include your own JavaScript checks and display a suitable placeholder message when a video is blocked.
An example of how to do this for Google Analytics can be found at https://www.drupal.org/node/1648286#comment-6145800
For YouTube, the EU has their own component that does a similar job, that can be seen at https://ec.europa.eu/trustfund-syria-region/content/home_en
You'll need to perform a full audit of all cookies if you want to properly comply with the regulations. That's a larger topic than I can cover here but there are plenty of online guides and tools to get you started.