In order to comply with the European laws, users must have the possibility to reject piwik’s cookie. Piwik offers a really simple solution for this, by including an IFrame.
Unfortunately, Discourse doesn’t allow iframe tags in posts…
Does anyone see a way to include this piwik iframe in Discourse TOS ?
Thanks.
So I have the JS loaded into the theme customizations, and the external “theme JavaScript file”* is linked in my test browser, just under where I inserted it like in the screenshot in a few posts earlier … BUT the requests aren’t coming through to the Matomo tracking web server.
(Tracking works fine for other non-Discourse sites, FWIW.)
Has anyone else seen that happen?
* e.g. https://discourse-cdn.example.com/standard11/theme-javascripts/{numeric_string}.js?__ws=my-discourse-forum.example.org
I’m confused why the tracking code is sending a custom variable called Anonymous. Isn’t that custom for your particular Matomo setup? It doesn’t seem like it should be there for everyone.
Devi inserire l’URL di Matomo nell’elenco consentito dell’intestazione Content-Security-Policy. Cerca l’impostazione amministrativa content_security_policy_script_src e aggiungi il tuo dominio (con https://) lì.
Ho difficoltà a far funzionare questo sulla mia installazione. Ho installato il componente e l’ho aggiunto al mio tema, ma Matomo segnala che non ci sono dati per il sito. Credo di avere le impostazioni corrette:
Modifica: Ulteriori indagini rivelano che l’errore nella console JavaScript appare solo in Firefox, non in Chrome (con le versioni più recenti di entrambi su Mac). Ora vedo alcuni risultati in Matomo, anche se Firefox è assente in modo evidente: tutti i visitatori, tranne uno, stanno utilizzando Chrome; l’unico eccezione sta utilizzando Safari.
suggerisce che potrebbe essere dovuto alle impostazioni “non tracciare” di Firefox, ma anche quando le disattivo per il mio sito, ricevo lo stesso errore nella console web con Firefox. Inoltre, Firefox non sembra considerare questo un tracker in ogni caso: