How to block cookies from video providers like YouTube
In this tutorial, I will show you how to block Youtube, Vimeo, and other cookies from video providers at your Joomla! website by using the "Cookies Policy Notification Bar - Joomla! Plugin" and the "AllVideos - Joomla! Plugin".
STEP 1
Download and Enable the "AllVideos" free plugin by JoomlaWorks. https://www.joomlaworks.net/extensions/free/allvideos
STEP 2
In your Joomla! folder, navigate to the directory "\plugins\content\jw_allvideos\jw_allvideos\tmpl\", and create the folder "GDPR_Compliant".
STEP 3
In the same folder, create the file " \plugins\content\jw_allvideos\jw_allvideos\tmpl\GDPR_Compliant\default.php" and add the below PHP code.
STEP 4
A. This is how it looks without the "GDPR_Compliant" AllVideos template.
B. This is how it looks with the "GDPR_Compliant" AllVideos template, and before the user accepts the cookies policy.
C. This is how it looks with the "GDPR_Compliant" AllVideos template, and after the user accepted the cookies policy.
With this method, the videos are not displayed before the user accepts, and the cookies from video providers are not loaded by default.
We used the " Cookies Policy Notification Bar - Joomla! Plugin" and the "AllVideos - Joomla! Plugin".
Special tip: Block video cookies from specific cookies categories
Sometimes you need to block videos from specific categories instead of the required categories.
Step 1
Create a new category "video-cookies" in the plugin settings.
Step 2
Open the file "\plugins\content\jw_allvideos\jw_allvideos\tmpl\GDPR_Compliant\default.php", and remove the comments of the lines 25-28 and 31, as you can see in the screenshot below.
LIVE DEMO
See how it works in our demo page here https://demo.web357.com/joomla/block-cookie-videos-from-youtube