Merging Two Sets of Website Data

I have two websites on Piwik that both reside in the same MySQL database. When setting up a redesign of our website, a new website in Piwik accidentally got created. The correct website that all that data should be in goes back to 2012. The new one that shouldn’t be there has only a month or so of data in it. Is there a way to add that month or so of data into the correct website in Piwik?

Hi, I have a similar issue. It happens quite a bit with WordPress MultiSites and the Piwik plugin, as if you create a new sub site a new piwik id automatically gets created.

Hopefully it is a simple bit of SQl, but would live to find out the method.

I think I found the table that stores all the values. Maybe I can just change the site ID? I am going to make a backup of my site to do some testing on to see if it (hopefully) works, and doesn’t break it.

Hi there,

replying to:

Hi, I have a similar issue. It happens quite a bit with WordPress MultiSites and the Piwik plugin, as if you create a new sub site a new piwik id automatically gets created.

Can you please makee sure you use latest Piwik version and latest wp-piwik plugin as this bug should be fixed already? if you still experience this please make sure to report the bug to WP-Piwik

Hi Matt,

I wasn’t describing a bug, but a way we work. i.e. we have a site (lets say site id 37) which is running in production, then a client asks for a redesign with a completely new theme, we build this and put it in the multi-site with some privacy on (and it becomes lets say site 88 ) and when it is ready to go ‘live’ we un map the domain from site 37 and map it to site 88.

So we get two sites in Piwik, one relating to multi site 37 and one relating to 88. I don’t see this as a bug, but just a situation where I’d like to combine 37 with 88.

(I am on the latest version btw but haven’t done this switch in the last two weeks )

Alan

I have the same situation as he described Alan described.

Ok thanks for explaining - in this case I’m not sure what could work. We have a tool for Migrating websites from Piwik to Piwik but not designed to merge several websites together: http://plugins.piwik.org/SiteMigration

If you need this feel free to create a feature request in Issues · matomo-org/piwik · GitHub

I have added a feature request on github: Merge data from two sites into one · Issue #7650 · matomo-org/piwik · GitHub

Out of curiosity, has anyone found a way to merge two sets of data?

Hi @AAugustine,

There is a brand-new plugin that allows moving single sites from one Matomo instance to another:

https://plugins.matomo.org/Migration

It would be great if you could try it out and report back if it works for you.

Thanks, I’ll give it a try.

1 Like

I gave it a try, and this is what ended up happening for me:

1 Like