Add gatus intervals and umami external link tracking
This commit is contained in:
		
							parent
							
								
									f48e702339
								
							
						
					
					
						commit
						4608081fba
					
				
					 5 changed files with 19 additions and 0 deletions
				
			
		|  | @ -10,6 +10,21 @@ umami_docker_image: docker.umami.dev/umami-software/umami:postgresql-latest | |||
| 
 | ||||
| umami_svc: | ||||
|   domain: "{{ all_services | service_get_domain(role_name) }}" | ||||
|   caddy_extra: | | ||||
|     handle /track-external.js { | ||||
|       header Content-Type text/javascript | ||||
|       respond <<JS | ||||
|         (() => { | ||||
|           const name = 'outbound-link-click'; | ||||
|           document.querySelectorAll('a').forEach(a => { | ||||
|             if (a.host !== window.location.host && !a.getAttribute('data-umami-event')) { | ||||
|               a.setAttribute('data-umami-event', name); | ||||
|               a.setAttribute('data-umami-event-url', a.href); | ||||
|             } | ||||
|           }); | ||||
|         })(); | ||||
|         JS 200 | ||||
|     } | ||||
|   port: 3000 | ||||
| 
 | ||||
| umami_env: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue