Removing Spam Traffic in Piwik

For all you Piwik users out there, there may have come a moment where you thought to yourself, “Is there bad traffic affecting my site?” Maybe you had this thought because an unusual spike in traffic occurred or something else out of the ordinary showed up in your Piwik dashboard.

For most Piwik users, you probably will never experience this, and there really is no need to worry about bad traffic. Robots, spiders, and referral spam all can lead to strange web traffic patterns and can make you question your web analytics data and web analytics tool. Thankfully, Piwik is an awesome analytics tool that takes care of bad traffic for us! Since Piwik only tracks users with Javascript enabled and has automatically excluded referral spam for more than a year, there’s nothing that most Piwik users need to do.

But if you’re one of the few users out there who need to disable the Javascript rule (for image tracking), then here’s what you need to do to avoid bad traffic showing up in your Piwik dashboard.


Allowing visitors to go to your site without Javascript

To set up image tracking in Piwik, go to Settings > Tracking Code > Image Tracking. Under Image Tracking, you’ll find a section called “Image Tracking Link.” Make sure that your Piwik tracking tag has &rec=1 in it to enable tracking for those with disabled Javascript.

Image tracking link Piwik spam traffic

Although you now are allowing those without Javascript to view your site, Piwik makes our lives easy once again. The most popular bots will still be ignored even though you have allowed visitors to go to your site with disabled Javascript. High five, Piwik!


Does Piwik really block all the spam/robots?

While the most popular bots won’t get through Piwik’s shield, it doesn’t mean that less popular or newer robots couldn’t slip through. So as a precaution if you know of specific instances of bad traffic, exclude traffic from a certain IP or range of IPs. Go to Settings > Websites

Global website settings IP


While you can exclude traffic from IP address in Piwik, you cannot remove specific traffic with a certain domain or range of domains. The only other sections you can filter traffic from your Settings are by URL parameters and by user agent. Both query URL parameters and user agents can be left blank, as there’s no benefit to add anything to these sections. Neither will track spam coming to the site, only users on your site (such as eCommerce members and non-members) and specific pages in your Page URLs reports (such as your blog entries).

So the IP address exclusion list usually does the trick in removing bad traffic from Piwik. But if you see a few spam entries still passing through, there is another solutions out there that you can try.


Alternate solution:
Alter your noscript tag under “Image Tracking Link” with Adrian Speyer’s amazing solution found here.


Say goodbye to bad traffic, and hello to real results

Now that you have fixed your traffic issue in Piwik, it’s time to analyze your data. For more tips and tricks on Piwik, head over to our Piwik web analytics guides section. Or if you’re having the same robots and spam traffic issues in Google Analytics, check out our related post on fixing bad traffic in Google Analytics (TBA).

Need web analytics consulting to improve your analytics setup? Call us at 877-694-2495 or email us at


All Web Analytics Guides
[image-caption-hover id=”2″]
Google Analytics Guides
[image-caption-hover id=”3″]
Piwik Analytics Guides
[image-caption-hover id=”4″]
Ecommerce Analytics Guides
[image-caption-hover id=”5″]