• Resolved stuarttoogood

    (@stuarttoogood)


    Hi,

    I recently installed RBR onto our site https://www.gasolicitors.com and there are no events firing and / or the bounce rate is actually increasing now. I have installed this plugin on a number of sites and its working perfectly but for this one it isnt.

    We have the most up to date version of RBR on the site and we dont use monster insights so I have used the recommended settings for analytics.js so is there anything else that is causing this not to work?

    Many thanks!

    Stuart

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Okoth1

    (@okoth1)

    Hi Stuart,
    It could be that something went wrong during the installation of the plugin. Could you install it again?

    If you look in the page’s source code you can’t find the javascript file, analyticsjs.js at the bottom of your page.

    Thread Starter stuarttoogood

    (@stuarttoogood)

    Hi,

    Thanks for your quick reply, will try re-installing it now.

    The code is there – it starts on line 66 if that helps?

    Cheers

    Stuart

    Plugin Author Okoth1

    (@okoth1)

    I looked at the link you gave me above and analyticsjs.js is not present on the version I have in front of me. Maybe the same for Google as well?

    Can you try a different browser?

    Thread Starter stuarttoogood

    (@stuarttoogood)

    Hi,

    Yep ive just tried opera, chrome and firefox, its present in all of those and the actual analytics account is receiving real time data so works fine.

    I cant understand why you are not seeing it – if you ctrl+f and search for ua- you will see two instances, the second one has the code and the first is just a general thing analytics puts in the code. Its not at the bottom of the source code, so please dont just scroll to the bottom of the code, its where the theme has placed it and having used this theme a number of times and your RBR code the same amount of times, it works fine on others.

    Have just reinstalled it now too.

    Can you find the code now, is it the right one? do you have any other ideas?

    Cheers

    Stuart

    Plugin Author Okoth1

    (@okoth1)

    Hi,
    I’m not talking about ua-, I’m talking about analyticsjs.js at the bottom of your page. There should be a link to the js file and that link is not there.

    <script type='text/javascript' src='https://www.gasolicitors.com/wp-content/plugins/reduce-bounce-rate/js/analyticsjs.js?ver=4.7.2'></script>

    The javascript file is there, but the link to the javascript is not there. You can find that link on other websites you’re using my plugin.

    • This reply was modified 7 years, 9 months ago by Okoth1.
    Thread Starter stuarttoogood

    (@stuarttoogood)

    Ok I can see this now – I never had to manually input that into the previous sites before though, that was usually introduced when I installed the plug in so is there any reason why the plug in would not have put that piece of code there now for this website?

    Any ideas as to how I add it?

    Best regards

    Stuart

    Plugin Author Okoth1

    (@okoth1)

    It’s the first time I have seen that it doesn’t go automatically.

    Could you replace the function starting line 402 with this and see if that helps?

    function rbr_scripts() {
        if (current_user_can('manage_options') && get_option('rbr_disableadmin') == "disableadminyes") {
        } else {
            $rbrtype = get_option('rbr_type');
            if (get_option('rbr_pause') == "pauseno" && $rbrtype == 'gajs') {$rbrplace = get_option('rbr_place');
    			wp_enqueue_script('rbr_scripts', plugins_url('js/gajs.js', __FILE__), array('jquery'), '', ($rbrplace == 'footer'));
            } elseif (get_option('rbr_pause') == "pauseno" && $rbrtype == 'analyticsjs') {
                $rbrplace = get_option('rbr_place');
    			wp_register_script( 'rbr_scripts', plugins_url('js/analyticsjs.js', __FILE__), array('jquery'), '', ($rbrplace == 'footer'));
                wp_enqueue_script('rbr_scripts');
            } elseif (get_option('rbr_pause') == "pauseno" && $rbrtype == 'ga4wpjs') {$rbrplace = get_option('rbr_place');
    			wp_enqueue_script('rbr_scripts', plugins_url('js/ga4wpjs.js', __FILE__), array('jquery'), '', ($rbrplace == 'footer'));
            }
            
            else {
            }
        }
    }
    add_action('wp_enqueue_scripts', 'rbr_scripts', 999);
    Plugin Author Okoth1

    (@okoth1)

    Sorry not very clear. This code needs replace the function in reduce-bounce-rate.php starting line 402 until add_action('wp_enqueue_scripts', 'rbr_scripts', 999);

    Thread Starter stuarttoogood

    (@stuarttoogood)

    I have just replaced it in the plugin as requested but still cannot seem to see anything in the source code.

    First time ive seen this happen too so its very odd!

    Plugin Author Okoth1

    (@okoth1)

    I can’t see what’s causing it right now. Could be some other function overruling mine.

    What you could do it pasting
    <script type='text/javascript' src='https://www.gasolicitors.com/wp-content/plugins/reduce-bounce-rate/js/analyticsjs.js?ver=4.7.2'></script>
    in the footer.php of your theme, just above the </body> tag. Not the right way though, but it might work for now.

    Btw are you using the twentythirteen theme?

    • This reply was modified 7 years, 9 months ago by Okoth1.
    Thread Starter stuarttoogood

    (@stuarttoogood)

    Hi, Yep we are using a customised version of twentythirteen – does that cause any issues?

    Will ask the developers if they can add the code for me.

    Many thanks

    Stuart

    Plugin Author Okoth1

    (@okoth1)

    The default version shouldn’t cause any issues. More likely that you have a plugin or something in your functions.php that causes the issue.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Plugin Not working’ is closed to new replies.