Could noscript images still be loaded when JS enabled?

Hi,
I’m just doing a bit of investigating of our stats. I was off on Shared-parental leave for 6months and whilst i was off someone else rebuilt our website. Our stats package was changed and now seem a lot different to before so i just want to be 100% sure they are recording correctly.

they installed Piwik on the server which requires a piece of JS and they have also put on this line

<noscript>
    <p>
        <img src="/stats/piwik.php?idsite=1&rec=1" style="border:0;" alt=""/>
    </p>
</noscript>

which (despite me asking for it to move) has been put in the section. Apart from the fact html shouldn’t be output in the head and the pointless

tags even if it was in the right place my question is…

Is it possible that this is being triggered as well as the JS, despite being in tags?

I just want to rule out it counting twice.

thanks

Looking at a subsite https://www.mcsuk.org/beachwatch/ (which is within our normal site) whilst it has the tracking code in a different position i had a look with the inspector and can see 2 instances. I am wondering if the piwik.js is the normal tracking script and the piwik.php (which outputs as a gif) is the version. does this seem likely? is there a way to check this?

thanks

Without looking at the PHP code and only giving the unminified JavaScript file a quick scan, this is more a guess. But I think the js sends the GET to the php and the php does logging etc.

In any case, that markup in the <head> looks to be a result of the not so rare confusion about the differences between head, header and heading.

ah yes i think you are correct. I’ve been reading everything i can find and i think that is the case. Although i did stumble across https://github.com/angulartics/angulartics/issues/435 which has a bit at the bottom where it is logging twice but that seems to be by enabling trackPageView method in the code, which i see is in our code. I wonder if that is the case.

How can i test this? Will our server log show calls to piwik.php that i can look at?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.