No "rec" parameter in <noscript> part of fallback image tracker part

Hi,

the “Standard JavaScript Tracking code” given for copy’n’paste of my site is (i.e. no img tracking code):


<!-- Piwik -->
<script type="text/javascript">
[...]
</script><noscript><p><img src="http://piwik.mysite.org/piwik/piwik.php?idsite=2" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->

whereas the default “Image Tracker code” is:


<!-- Piwik Image Tracker -->
<img src="https://piwik.mysite.org/piwik/piwik.php?idsite=2&rec=1" style="border:0" alt="" />
<!-- End Piwik -->

But the doc says that:


rec - (required) The parameter &rec=1 is required to force the request to be recorded

Does that mean that the area above won’t be working as a fallback when javascript is disabled? The forgotten “rec” parameter there seems like a bug?

Yes please search in FAQ: New to Piwik - Analytics Platform - Matomo

I’ve also asked myself the purpose of the tag but never took the time to look for an answer.

A simple google search ( ie. “piwik noscript” ) led me to the explanation : restore the noscript call in the javascript tracking code · Issue #768 · matomo-org/matomo · GitHub

[quote=matt]
Yes please search in FAQ: New to Piwik - Analytics Platform - Matomo

I know about that. But why do you offer a copy’n’paste snippet that is not working? The noscript-code in:


<!-- Piwik -->
<script type="text/javascript">
[...]
</script><noscript><p><img src="http://piwik.mysite.org/piwik/piwik.php?idsite=2" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->

looks like a working fallback for non-js users. After digging deeper one learns that this noscript-code is not working at all as it is, because one actually has to add the rec param.

I suggest changing it to the following (rec param given and short explanation):


<!-- Piwik -->
<script type="text/javascript">
[...]
</script>
[b]<!-- uncomment the following if you want non-javascripts users and bots to be counted [/b]
<noscript><p><img src="http://piwik.mysite.org/piwik/piwik.php?idsite=2[b]&rec=1[/b]" style="border:0" alt="" /></p></noscript>
[b]-->[/b]
<!-- End Piwik Tracking Code -->

Another alternative would be to remove the noscript completely then: There is no need for non-working code.

Hi,

Shouldn’t that be & ?

AT least otherwise the code fails W3C validator.

sun

I agree ~ why do you have code that does not work?

the noscript code is there to alert users that it is possible to track visitors without javascript. It’s better to leave it ‘disabled’ as it has absolutely no impact, and also still allows to see in the logs requests from bots to piwik.php