How to stop piwik from tracking local development website

I just installed piwik on my server and placed the tracking code on my website. Everything is working fine, except that piwik is tracking traffic from both my live website http://example.com and also my local dev environment which is http://local/example/

Is there any way to tell piwik to track only data from http://example.com and ignore all else?

Right now, a web page like http://example.com/subfolder/index.html is tracked as /subfolder/index.html, and on my local machine http://local/example/subfolder/index.html is also being tracked by Piwik as /example/subfolder/index.html

In settings, I have set URL to example.com

I would rather not have to manually exclude IPs because I travel frequently, and don’t want to keep adding new IPs whenever I work from a new location.

Any thoughts?

Thanks,
Steve

You can engage the “Exclude your visits using a cookie” option. This, however, will exclude all your visits from that machine, no matter whether you’re accessing the remote production or the local development site.

You can set this cookie when you’re logged in as the Piwik administrator. The option is on the User Settings page that you access after you have clicked on the “Settings” top-of-page menu.

The other way of doing this is to assign a different site number to the local development site. This way, Piwik will track visits to the local site separately from those to the remote site.

Thanks canajun2eh, I appreciate the help!

The problem also happens with pure local files.
See this opened issue : this issue

Is there any way to prevent that and secure the piwik stats from anyone wanting to corrupt it this way, waiting for an official update ?