Tracking NodeJS Express REST Calls

Hello,

I have a web app that consists of 4 web pages. It uses nodeJS and the loads of the ststic pages gets logged correctly in Matomo, which is understandeable since I have integrated the .js tracking code in my page.

However, each of these pages makes a call (every 10 seconds) to some backend routes in express.js. These calls don’t get logged.

Has anyone solved a similar problem successfully?

Thanks in advance,
Volker

Hi @kerk1v
Then you have to trigger also a call to the tracking when your app makes the call to the backend…
I suggest you don’t trigger a page view, as in the point of view of the user, this is not a page view. Also, most of the time, Analytics are used to track user interaction. In your case this is not an user interaction. Why do you want to track this?

Hello,

The pages are relatively “static” and only the data gets reloaded from the API. The API is quite Database-Intensive and I would like to have an overview of how often they get called to plan capacity.