1cedsoda / traefik-umami-plugin

Integrate Umami into any web service. Request forwarding, script injection and server side tracking.
https://plugins.traefik.io/plugins/65d4cc8e769af9e5f2251e09/umami-analytics
Apache License 2.0
11 stars 1 forks source link

Usage #5

Open trmendes opened 1 month ago

trmendes commented 1 month ago

Hi!

I would first like to thank you for taking your time to develop such plugin :)

I would like to have your plugin running for some of my services.

For now, I have a config that looks like this:

      # Umami
      - "traefik.http.middlewares.umami-hauk.plugin.traefik-umami-plugin.umamiHost=umami:3000"
      - "traefik.http.middlewares.umami-hauk.plugin.traefik-umami-plugin.websiteId=3590d714-4221-4075-ac33-88241e5b21fe"
      - "traefik.http.middlewares.umami-hauk.plugin.traefik-umami-plugin.scriptInjectionMode=tag"
      - "traefik.http.middlewares.umami-hauk.plugin.traefik-umami-plugin.ForwardPath=https://umami.mydomain.com"
      # Make usage
      - "traefik.http.routers.hauk.middlewares=ratelimit,secure-headers,authelia,umami-hauk"

https://umami.mydomain.com is the URL to access umami and when I have a new page to be tracked the tracking code script has `src=https://umami.mydomain.com/scripts.js'


When I check traefik logs I see:

g=[traefik-umami-plugin] script: <script async defer data-host-url='/https://umami.mydomain.com' src='/https://umami.mydomain.com/script.js' data-website-id='3590d714-4221-4075-ac33-88241e5b21fe' data-auto-track='true'></script>

It seems that the configuration is incorrect. Could you please guide me on how to configure it properly?

Thanks once again.

Arc-2023 commented 2 weeks ago

the document is confusing...