(solved) Content tracking sending ping requests to the wrong Matomo installation URL

I recently setup content tracking (https://developer.matomo.org/guides/content-tracking) on a client’s setup. However, it hasn’t been tracking content interactions. Looking at the browser devtools, the network requests are being sent to the wrong URL. They appear to be going to “/matomo.php”.

For example, Matomo is installed at https://analytics.example.com, and the page URL is https://example.com/my-blog-post, the URL that interactions are being sent to for that page is https://example.com/my-blog-post/matomo.php. It only occurs for content interaction tracking, pageviews are sent to the correct Matomo installation URL.

Matomo tracking is installed via the JS container script. Matomo is installed on a subdomain, with the site itself on the primary domain (non-subdomain).

EDIT: Turns out one of the tags in the container was overwriting the Matomo installation URL. Fixed now.