Disabling custom code from certain pages only


We have added 3rd party custom code to enable cookie and privacy management on our website with webflow. However, we would like to disable it from certain pages. Is it possible? If so, how?

Thank you.

  • M

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

By moving your code to the page level, not project level. Yes, this is a pain and you should certainly consider loading the code from a remote server since it solves part of the maintenance nightmare. This is a problematic limitation with the platform.

Another approach would be to use the “window.location.href” property to get the current URL of the page and then check if it matches the desired value using an “if” statement in JavaScript and load your code or script.