Usercentrics - PUBLIC

HubSpot Forms error when SDP is enabled

Error message:

“Uncaught (in promise) DOMException: Document.querySelector: '' is not a valid selector”

Why is this happening?

HubSpot Forms overrides the DOM, making the Document.querySelector() not available.

Solution

We recommend using our functionality deactivateBlocking for the technology HubSpot Forms, more information can be found here: Deactivate Smart Data Protector for specific services.

<script> uc.deactivateBlocking([ 'r1Fhc4iOoWX', // HubSpot form is not blocked // ... you can also add more service IDs similarly ]); </script>


After this step the error will stop happening, however, if you need to adjust the technology and prevent it from being executed if there isn’t any consent from the user, please follow this: Adjust existing scripts.

 

 

Usercentrics - PUBLIC