• I recently inherited a website using ocean-extra. I noticed they had a nearly zero bounce rate in Google Analytics and traced it to the GA code being called twice. It only occurs when the Ocean-Extra plugin is activated, and it happens regardless of the method I use to load the GA code. I’ve tried using a GA plug-in and putting it directly in a file on the site. It appears Ocean-Extra is trying to minify JS code and put it in the footer. See line 266+/- of ocean-exrta.php When it does this, it includes my GA code in the footer but also leaves it the original place… so it’s loaded twice. I commented out line 266 of ocean-exrta.php and it solved the issue, but this obviously isn’t a permanent fix. Any suggestions on how to fix this would be appreciated. <?php // echo Ocean_Extra_JSMin::minify( $output ); ?>

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Amit Singh

    (@apprimit)

    Hello,

    Where you have added the GA code? I didn’t understand your query clearly. Can you please share a screenshot of the issue?

    Thread Starter abbimedia

    (@abbimedia)

    As I said, I inherited this website from another developer. When I first noticed Google Analytics was firing twice, it was being loaded by a plugin “GA Google Analytics”. I assumed it was also being loaded somewhere else in the site, so I disabled this plug in, after which no Google Analytics code was being loaded. Next I added Google analytics manually by adding it to the child-theme functions.php file. Again, it was loading twice, even though it’s only installed once. Using “View Source” I could see the Google Analytics code in the HEAD where it should be, plus it was loading again at the bottom of the page, apparently being loaded by line 266 of ocean-extra.php. If I comment out this line, things work normally. I could not find where this could be controlled thru the dashboard.

    Here is a screen shot: https://bastrophomesource.com/wp-content/uploads/2019/11/oceans-extra-issue-scaled.jpg

    • This reply was modified 5 years, 3 months ago by abbimedia.
    Thread Starter abbimedia

    (@abbimedia)

    Any thoughts on this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Zero Bounce Rate – Google Analytics loaded twice’ is closed to new replies.