Web Ninja Google Analytics
undefined variable and constant (5 posts)

  1. Joy
    Posted 4 years ago #

    version 1.0.8
    I get this in my error_log

    PHP Notice: Undefined variable: wbga_debug_enabled in /wp/wp-content/plugins/web-ninja-google-analytics/webninja_ga.php on line 752

    Use of undefined constant user_level - assumed 'user_level' in /wp/wp-content/plugins/web-ninja-google-analytics/webninja_ga.php on line 1413


  2. cm258
    Posted 4 years ago #

    I've had to fix those errors every time I update this plugin for a while now. I actually make three edits:

    Add a line before line 752 right after the function declaration for "wgba_debug":

    function wbga_debug($message) {
      global $wbga_debug_enabled;  // insert this line
      if ($wbga_debug_enabled) {

    Then, go to the function "wgba_track_user" and change the third line of that function to make it look like this:

    if (!($user_level)) {

    Finally, I also have to make a change to the in the Stat Dashboard Settings section. There's a missing "php" opening a block of PHP code that will cause issues on some systems. It's on line 1076 in the file and looks like this:

    <? if(!class_exists('SimpleXMLElement'))

    I alter it like so:

    <?php if(!class_exists('SimpleXMLElement'))


  3. joshfowler
    Plugin Author

    Posted 4 years ago #

    Thanks for catching those. I just changed the code and pushed it to wordpress. It should tell you to update to 1.0.9 soon.

  4. Joy
    Posted 4 years ago #

    Thank you!
    Maybe the author will fix it in the plugin...

  5. cm258
    Posted 4 years ago #

    You're welcome...

    Maybe the author will fix it in the plugin...

    Looks like he just updated to 1.0.9, and incorporated those three fixes...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Web Ninja Google Analytics
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic