Sorry, I don’t understand:
At my question “in the same siteid” you replied “yes”
and after “one without internal traffic and one with” that I understand as “no”
As described in the doc, you can use some MTM variable to select the SiteID.
And this variable can be configured by the MTM datalayer or by a JavaScript function (eg that could read the URL and deduce the siteId form it), or a JavaScript global variable, etc.
So: yes, you can use the same MTM container for several sites.
Nice, but how do i set it up for the another website? I can set it up for siteid 1 and then when I am going to use the same setup for siteid 2 how do I do that?
<!-- Matomo Tag Manager -->
<script type="text/javascript">
var matomoContainer = 'https://matomo-server/js/container_aA0bB1cC.js'; // You must set the MTM container URL here
var siteId = 1; // You must set the site id here
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
_mtm.push({'siteId', siteId});
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=matomoContainer; s.parentNode.insertBefore(g,s);
</script>
<!-- End Matomo Tag Manager -->