I have a strange issue, probably someone has an idea what the reason can be:
We host OS images on our website, previously 7z-compressed, and downloading those were and are tracked very well as downloads, shown in visitor activities and we have a goal defined which successfully counts those image downloads.
Recently we switched to xz-compressed images, with
.img.xz file ending, along with hashes with
.img.xz.sha256 ending and signatures with
.img.xz.asc ending. Downloading any of these files is not tracked by our Matomo at all, they do not appear as any activity. The hash files have a
text/plain MIME type, hence are shown as text in browser, but as well Matomo does not get any activity from it. I added test
.xz files at a different path/URL, and it is the very same, no
.xz file download anywhere at our server is tracked at all, while any other file type download just next to it is tracked fine.
I thought that it might be related to the MIME type, so I tried to set it to be the same as the 7z files, but it does not change something. Since also the hashes and signatures have other MIME types, it actually makes sense that this is not the reason.
I compared the HTTP headers via
curl -I to see whether there is any difference between the xz and 7z URLs, but there is none, aside of the expected ones: content-type/length, date, last-modified, etag and such.
We host our website through Cloudflare. One difference was that Cloudflare did automatically assign the 7z MIME type, as the server did not. It did the same for the xz archives, but falsely also assigned
application/x-xz for the hash and certificate files, so we do now define them directly at our webserver. I also defined the 7z archive MIME type directly at our sever, to see whether this makes a difference, but it does not.
I cleared the Cloudflare cache every time I did a test. The Matomo frontend is added via Matomo Cloudflare app, so it works for cached and none cached downloads/visits, and it always did reliably, and still does for every other download, aside of these 3 newly added file types, i.e. it works well for gz archives, deb (Debian packages), zip, 7z, media and txt files, all correctly tracked.
I am puzzled what makes the newly added xz/sha256/asc downloads different, so that Matomo does not track them at all. Does anyone have a clue or idea where I could have a look at or how to further debug?
Btw, here some files I can replicate it with:
test.xz.gzare successfully tracked as downloads
test.xz.ascare not tracked at all, exactly the 3 new file types we started to use to distribute our OS images.