i have the same problem.
We have hired a privacy firm to audit our website and they find fault with the fact that the session cookie for quform is already loaded before consent, which is not allowed to be according to GPDR.
How can I set it so that the cookie is not loaded until there is a form on the page. The above script does not work for us.
Thank you for your help