Title: WP Consent API
Last modified: June 30, 2024

---

# WP Consent API

 *  Resolved [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/)
 * Whenever i have litespeed on i get the following errors in console
 * Uncaught ReferenceError: consent_api is not defined
 *     <anonymous> [https://domain.com/wp-content/plugins/wp-consent-api/assets/js/wp-consent-api.min.js?ver=1.0.7:1](https://domain.com/wp-content/plugins/wp-consent-api/assets/js/wp-consent-api.min.js?ver=1.0.7:1)
   
   I have added/wp-content/plugins/wp-consent-api/assets/js/wp-consent-api.min.jsto
   exclude JS but it still comes

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17859377)
 * please provide the report number
 * you can get it in toolbox -> report -> click “send to LiteSpeed”
 *  Thread Starter [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17859942)
 * here you go
 * Report number: **MYHJKOBE**
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17860600)
 * please try put
 *     ```wp-block-code
       consent_apiconsent-api
       ```
   
 * into JS exclude and defer JS exclude fields, save and purge all
 *  Thread Starter [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17860859)
 * fantastic, thank you!
 * I have also noticed i have a similar issue
 * Uncaught TypeError: window.wp is undefined
   <anonymous> [https://domain.com/wp-content/plugins/google-listings-and-ads/js/build/gtag-events.js](https://domain.com/wp-content/plugins/google-listings-and-ads/js/build/gtag-events.js)
   I have addded but it does not fix it./wp-content/plugins/google-listings-and-
   ads/js/build/gtag-events.js
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17860872)
 * please try also add `window.wp` into the both exclude list
 *  Thread Starter [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17860959)
 * Hello
 * I have tried this, it does not resolve the issue.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17861359)
 * I don’t see any error like `Uncaught TypeError: window.wp is undefined` now
 *  Thread Starter [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17862153)
 * Hello
 * on chrome it shows as
 * Uncaught TypeError: Cannot read properties of undefined (reading ‘hooks’)
   at 
   gtag-events.js?ver=67fb0e5a4124c10b0fde:1:42
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17863515)
 * then it’s different issue
 *     ```wp-block-code
       wp-content/plugins/elementskit-lite/widgets/init/assets/js/widget-scripts.jswp-content/plugins/elementor/assets/lib/font-awesome/js/v4-shims.min.jswp-content/plugins/master-addons/assets/js/master-addons-scripts.jswp-content/plugins/woocommerce-google-analytics-integration/assets/js/build/main.jswp-includes/js/jquery/jquery.min.jswp-includes/js/jquery/jquery-migrate.min.jswp-includes/js/dist/i18n.min.jswp-includes/js/dist/hooks.min.jswp-content/uploads/essential-addons-elementor/eael-2.jswp-content/plugins/google-listings-and-ads/js/build/gtag-events.jswp-content/plugins/elementor/assets/js/frontend.min.jswp-content/plugins/elementskit-lite/widgets/init/assets/js/elementor.jswp-content/plugins/customer-reviews-woocommerce/js/frontend.jswp-content/plugins/essential-addons-for-elementor-lite/assets/front-end/js/view/general.min.js
       ```
   
 * try this list
 *  Thread Starter [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17865082)
 * I tried this, unfortunately its now giving even more errors.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17865957)
 * try append `wp-content` and `wp-includes` into the lists as well , purge all ,
   see what it shows.
 *  Thread Starter [hotice83](https://wordpress.org/support/users/hotice83/)
 * (@hotice83)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17868270)
 * that removed that error but then created more other errors.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17868734)
 * try set `js combine external and inline` , at least to narrow down if it’s inline
   js , or external js

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘WP Consent API’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/wp-consent-api-3/#post-17868734)
 * Status: resolved