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.
Debes añadir tu URL de Matomo a la lista de permitidos en la cabecera Content-Security-Policy. Busca la configuración de administración content_security_policy_script_src y agrega allí tu dominio (incluyendo https://).
Tengo problemas para que esto funcione en mi instalación. He instalado el componente y lo he añadido a mi tema, pero Matomo indica que no hay datos para el sitio. Supongo que tengo la configuración correcta:
Edición: Una investigación más detallada revela que el error en la consola de JavaScript solo aparece en Firefox, no en Chrome (con las últimas versiones de cada uno en un Mac). Ahora estoy viendo algunos resultados en Matomo, aunque Firefox está notablemente ausente; todos los visitantes, excepto uno, usan Chrome; la única excepción está usando Safari.
sugiere que podría ser la configuración de “no rastrear” de Firefox, pero incluso cuando las desactivo para mi sitio, obtengo el mismo error en la consola web con Firefox. Y, en cualquier caso, Firefox no parece estar considerando esto como un rastreador: