Block offsite visits

Scenario:
Visitor in IE visits a page and save to his computer with .mht extension file.
Everytime he opens it in his computer (if his internet connection is on) it count as a visit…

Not being interested in counting these visits, how is it possible to block it?

You could modify your tracking code to not log the page view, e.g.,


if (window.location.protocol !== 'file:') {
    piwikTracker.trackPageView();
}

In the upcoming 1.2 release, you can force the user’s browser to view your live site.


// before the call to piwikTracker.trackPageView()
piwikTracker.redirectFile('http://myurl.com');