Matomo Tag changes from .php to a .gif in developer console

Hi All,

There might be a really easy explanation for this so hoepfully some one can help.

Normally when I check the console, the Matomo Tag is “Tracker.php” and is a script;

However I’ve also seen it as a gif which has Tracker.php in the name combined with a lot of atributes (see below)

Anyone know why this happens? Is it something of concern as it seems to take longer to load



The regular Matomo tracking does two HTTP request. First it makes a request to matomo.js which is the Javascript that does the tracking. This is just fetching a small file, so it should be pretty fast (of course depending on your internet speed). The second request is going to matomo.php and is sending the data to Matomo (which then handles it and stores it in the database which takes a bit longer depending on your server) and then returns a tiny gif.

You seem to be using the alternative URL instead of matomo.js and matomo.php you point both to /js/tracker.php which then accepts both parts. (I think there is a setting in Tag Manager for which endpoint to use)

Of course 10 seconds is really a lot, so I’d recommend you to look into

With a normal webserver on an SSD and enough RAM for MySQL you should be able to get those requests quite a bit below 300ms and with it gets below 40ms.

Thanks again Lukas,

Yes we use the whitelabel plugin developed by matomo to whitelabel the tracking endpoints.

The speed issue was what was flagged to us hence why we looked into it, normally speeds are coming back well under 400ms. I was just surprised to see this GIF! Is there any other documentation around this I can look into just to read more into this?

Any reason why it sometimes shows the GIF in the console network tab and sometimes only shows the .php? These are just for my curiosity


Yes, the script returns the endpoint of matomo.js (where it fetches the JavaScript) and of the matomo.php (where it returns the GIF after the data is stored).

On a normal page load you should see both.

I see it now - had my dev console filtered to just shows scripts !

Cheers pal, really appreciate it

1 Like