Set up different ID

Hello,
I have my sites and my client’s sites.

I would like to have my sites under IDs 1-20 and client’s site should start with IDs 40 and more. How can I do this in piwik? Can I easily change site ID in database?

thanks.

The sites that I use PIWIK to report on have clientIDs in the file, I simply change the site id in the piwik_site table to the clientID from the website that is being tracked and everything works fine.

John

[quote=jstock @ Aug 20 2010, 04:02 PM]The sites that I use PIWIK to report on have clientIDs in the file, I simply change the site id in the piwik_site table to the clientID from the website that is being tracked and everything works fine.

John[/quote]

thanks for your reply.
so if I understood it good you simply change ID number in database table piwik_site and in tracking code (of course), and everything works, right?

that is exactly what I did, I have sites 50,74,88,99,105,116,117,118,119 and it is working fine with all of them

Any time you add a new site you will need to go in and change the id before you add the tracking code and start using the piwik tracking code for that site, but it works great for me.

John

John, thank you very much.
I tried to check db but I think this must be done before I use tracking statistics first time. I can’t do it when I have some statistics for my site (maybe I could but I should change idsite in whole db).

thanks for help

if you have tracking stats in the db already you would have to update all the siteid fields or the data will get messed up.
I have done this in the past without a problem, just make sure that you change the piwik_site table first, that way it can start tracking with the new id while you are updating the rest of the sites. You will want to remove the archive_blob and archive_numeric tables as those tables have site specific data stored in an encrypted field that is used for historic reporting.
If I understand how these tables work correctly after they are removed the next time the archiving script is called all the visits should be done again, I may be wrong about this.

John