According to the Facebook documents, we must first download the script with the revoke option, then set the cookie if the user has given his consent.
So we need added the main code in Theme > Settings > Custom code > Script where need set the revoke option (blue line)
Then we need added grant option in Cookie banner settings Theme > Settings > Cookie Banner
Thus, we were able to activate the pixel installation only after obtaining the consent of the user.
This option was relevant at the dawn of the Internet, but now its use is meaningless, because many of the features of the theme, such as the installation of tracking scripts, menus, modal window - all work only with JS enabled.
I recommend removing this block from all scripts.
However, if you want to keep it, then you need to take it out for js code to avoid errors in Yootheme Pro.
paste js code here
If the existing script content is not wrapped in <script> and </script> tags but immediately starts with a line of code you need add the <script> and </script> tags.
If the existing script content is wrapped in <script> and </script> tags insert the additional script also wrapped in <script> and </script> tags.
You can order script connect for your site for 5€ or full optimization the Facebook events analitics.