Feature/matomo#91
Conversation
| import { MatomoConfiguration } from "ngx-matomo-client"; | ||
|
|
||
|
|
||
| export interface Environment { |
There was a problem hiding this comment.
This is to validate the environment object. Else TypeScript does not know what matomo is and requires you to do a lot of cumbersome checks along the lines of if ('matomo' in environment && typeof environment.matomo === 'object' && 'siteId' in environment.matomo && typeof environment.matomo.siteId === 'string') { ...
Now we not only know that environment could contain a matomo key, but also that it will have the shape expected by ngx-matomo-client.
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "fileReplacements": [ |
There was a problem hiding this comment.
I thought this was done automatically, but apparently not. 🙄
| version, | ||
| sourceUrl, | ||
| }; | ||
| matomo: { |
There was a problem hiding this comment.
This file gets overridden by this file that I've added to the development repository.
tijmenbaarda
left a comment
There was a problem hiding this comment.
I have no experience with Matomo in Angular (just in plain Django), but it seems to be working correctly! Matomo only shows data of a day before, maybe that was why you were not seeing any visits?
|
What I understand from the Firefox article is that DNT is not supported anymore at all and not send either, since the header is deprectated. But I see indeed that my Firefox (v. 140) is still putting it in the header... |
|
Interesting! In my local Matomo instance I saw near-live updates, but maybe they are configured differently. Glad to see that it works! |
Closes #10
This PR adds Matomo to the application to track page visits. The application has been deployed to the ACC server but I'm not sure it's working correctly. I can see Matomo requests going out (the
204 - No Contentstatus code is expected) but I see no traffic in the dashboard. Maybe this is becauseacceptDoNotTrackis set totrueand every browser I have requests DNT?(FireFox always sends
DNT: 1as a Request Header, and you cannot turn it off anymore, cf. this article.Would you be able to test this?
Good to know: for local testing of this and other applications, I have created this repo that lets you build a local Matomo instance (in Docker). I did manage to see stats in my local Matomo instance, but I had
acceptDoNotTrackset to false there.I am also updating the RSL-Info docs on Matomo with lessons learned in this PR.