Problem with data going from the production site to the pre-production site in Matomo Tag Manager

Hi everyone, I’m having a problem with Matomo Tag Manager and I’m hoping you can help me solve it.

I’m currently working with a client who has three separate environments for their website - Development (Dev), Pre-production (Preprod) and Production (Prod).

Each of these environments has a unique URL and a specific site ID associated with it on Matomo.

I have set up a separate container in Matomo Tag Manager for each environment, each in “Live” mode. However, I’ve noticed that the tracking data from the production site seems to also go back to the pre-production site. I have checked and am sure that the production tracking code is correctly implemented on the production site, and the pre-production tracking code on the pre-production site.

I would like to understand why this tracking data is being shared between the two environments despite separate containers being set up for each. If anyone has encountered this problem or has any ideas on what might be causing this behaviour, I would be extremely grateful for any help or suggestions you could provide.

I’ve already tried setting the preprod container to “Staging” or “Dev” to see if that changes anything but it doesn’t.

Thanks in advance for your help