JS Tracker : how to use the same tracker for different environments


I think it’s a basic question, but I didn’t find a good answer.

Idea is that I want to use the same code for my testing and production environments, but of course I don’t want to mix the data.
Let’s say that testing site is starting with mysite1-test.local and production site with mysite1.local

I have a different piwik servers for testing and for production.

Ideally I would have the same site ids for testing and prod.

What could be the proper way to do this ?

Thanks for your feedback…