Title: Javascript error when using uBlock
Last modified: October 11, 2018

---

# Javascript error when using uBlock

 *  Resolved [Phill](https://wordpress.org/support/users/theotherphill/)
 * (@theotherphill)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/)
 * Hi, when visiting a page with this plugin and uBlock (like adBlock) it causes
   the following javascript error:
 * Uncaught ReferenceError: scroll_events is not defined
    at HTMLDocument.<anonymous
   > (VM55:1372) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.
   min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.K (jquery.min.js:
   2)
 * This is due to the ga-scroll-events.js file being blocked by the ad blocker.
 * The issue seems to be that you’re assuming that the scroll_events object exists,
   and when it doesn’t it causes all Javascript on the page to fail.
 * Is it possible to get the following fix added to ga-scroll-event.php, line 162?
 *     ```
       if(typeof scroll_events == 'undefined') {
         return;
       }
       ```
   
 * That is based on version 2.5.1
 * Cheers,
    Phill

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

 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/#post-10769778)
 * [@theotherphill](https://wordpress.org/support/users/theotherphill/) thanks for
   the heads up.
    Will add this within a few days
 *  Thread Starter [Phill](https://wordpress.org/support/users/theotherphill/)
 * (@theotherphill)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/#post-10828723)
 * Hi [@yuvalo](https://wordpress.org/support/users/yuvalo/), any word on when this
   fix might be released? 🙂 Trying to avoid our fix being overwritten accidentally
   due to a plugin update.
 *  [Chris](https://wordpress.org/support/users/lamordnt/)
 * (@lamordnt)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/#post-10831715)
 * Same problem here. Needs to be fixed… any update?
 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/#post-10841101)
 * [@lamordnt](https://wordpress.org/support/users/lamordnt/), [@theotherphill](https://wordpress.org/support/users/theotherphill/)
   
   The fix is coded but I don’t want to push it over the weekend. Hang in there 
   until Monday morning.
 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/#post-10850283)
 * [@lamordnt](https://wordpress.org/support/users/lamordnt/), [@theotherphill](https://wordpress.org/support/users/theotherphill/)
   
   Fix released in 2.5.2

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

The topic ‘Javascript error when using uBlock’ is closed to new replies.

 * ![](https://ps.w.org/wp-google-analytics-events/assets/icon-256x256.jpeg?rev=
   2189709)
 * [WP Google Analytics Events - No-Code Custom Event Tracking for Google Analytics](https://wordpress.org/plugins/wp-google-analytics-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-analytics-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-analytics-events/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-analytics-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-analytics-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-analytics-events/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-ublock/#post-10850283)
 * Status: resolved