Used the wrong tracking id

Hello,

We have 4 sites, each with their own site id, and recently we did an upgrade on 3 of the sites and managed to change their tracking code so that all got registered on site id 1.

We know the timespan and we know what sites that’s involved, is it possible to do some crunching in the database to fix this?

e.g all traffic to http://site2.com should be registered on site id 2 instead of site id 1.

You can do UPDATE piwik_log_visit SET idsite = X WHERE idsite = Y AND … etc.