Piwik (open source web analytics) uses javascript to track visitors. However, for visitors who have javascript disabled they suggest using the <noscript>
tag:
When a visitor has disabled JavaScript, or when JavaScript cannot be used, you can use an image tracking link to track visitors. Generate the link below and copy-paste the generated HTML in the page. If you're using this as a fallback for JavaScript tracking, you can surround it in
<noscript></noscript>
tags.
Using a js
vs no-js
class on the body isn't really an option, since that would not be able to prevent the image from loading. So the noscript tag seems like my only option, but will it work as expected since it is deprecated?
Visitors that have JavaScript disabled means practically:
The only place where such image-tracking could have work are the HTML mail messages, but such images are normally blocked, or you could fall under spam filter.