We have recently run a migration on our analytics data, to separate a single ‘site’ into four different ‘sites’.
We did this by updating the idsite field for the piwik_log_conversion, piwik_log_link_visit_action and piwik_log_visit database tables.
The raw data in these tables is now correct, but when we delete the archives and re-calculate them, they still contain the old site IDs.
What are we missing? Where does the archiver get the old site IDs from?
Seems like you forgot to update the IDs somewhere or didn’t delete the archive (blob|numeric) tables properly. But really, there are so many things that could possibly cause this, that nobody can give you an educated hint.
Can you confirm that the idsite field in the piwik_log_conversion, piwik_log_link_visit_action and piwik_log_visit database tables are the only places where the site id is stored? (except for the archives themselves, of course)