One goal is not taken in account others are OK. Code is the same


  • I have several goals and it works fine for all my sites.
  • I added a new goal, and this goal is managed with the same hugo code than others
    • In this case it is a click on a menu item
    • Goal name : “Shop”.
  • I can see the page being hit in real time. But no trace for this goal. Others goals/click react as expected.
  • I do not have errors on inspector.

You can see it in action

I’m stuck trying to debug this strange thing on Chrome/Brave/Safari [EDIT : seems only on Safari, finally]

Any light ?

My generated HTML code

<script async defer data-domain="" src=""></script>
 <script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>


function WebCocoon() {
function Shop() {

And the menu for those 2 items is :

<li class="nav-item">
   <a class="nav-link"

<li class="nav-item">
   <a class="nav-link"
      target="_blank" rel="noreferrer">Cocoon</a>

Mmmmmm … It seems that it only occurs on Safari, but I see nothing blocked on safari.

OK. Didn’t found the cause for the script being buggy with my safari version.

Anyway I changed my logic to put the custom goal when loading the page and not clicking the menu.

Benefit ?

  • It works better with my multi language site (1 goal for all languages instead of 1 page for each language)
  • I updated my plausible-hugo module with more functionality ! ha ha ha