Matomo Tag Manager
Add the tag through Matomo Tag Manager, as a Custom HTML tag.
Not every tag manager keeps a script tag’s attributes as you wrote them (Google Tag Manager strips the
data- ones), so add the tag with a few lines of script instead, with your domain in place of
example.com:
<script>
(function () {
var tag = document.createElement('script');
tag.async = true;
tag.setAttribute('data-domain', 'example.com');
tag.src = 'https://fiveb.ar/js/tally.js';
document.head.appendChild(tag);
})();
</script>In your container, go to Tags, choose Create New Tag and pick Custom HTML. Paste the script into it and have it fire on a Pageview trigger, adding one if the container hasn’t got one. Then, under Publish, create a new version and publish it. See Matomo’s help on managing tags.
Once it’s live, check it works.