How do I use two Piwik tags on a page?

In order to analyze one domain, we created two Piwik websites.
One of the web sites aggregates only some pages.
The other one is to total all the pages.
When I place two tags on one page, it seems that the tag I wrote above does not work.The total value is too small.
Is it impossible to send tags from one page to two website?

Hi,

You can track one page into multiple Matomo instances or websites.

But you can’t just add a second tracking code, but you have to modify the first one as explained here:

https://developer.matomo.org/guides/tracking-javascript-guide#collect-your-analytics-data-into-two-or-more-piwik-servers