mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	Shortened webserver to srv-web-
This commit is contained in:
		
							
								
								
									
										1
									
								
								roles/srv-web-injector-matomo/templates/head_sub.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								roles/srv-web-injector-matomo/templates/head_sub.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| <script>{{matomo_tracking_code_one_liner}}</script> | ||||
| @@ -0,0 +1,2 @@ | ||||
| # sub filters to integrate matomo tracking code in nginx websites | ||||
| sub_filter '</body>' '<noscript><p><img src="//matomo.{{primary_domain}}/matomo.php?idsite={{matomo_site_id}}&rec=1" style="border:0;" alt="" /></p></noscript></body>'; | ||||
| @@ -0,0 +1,19 @@ | ||||
| var _paq = window._paq = window._paq || []; | ||||
| _paq.push(["setDocumentTitle", document.domain + "/" + document.title]); | ||||
| _paq.push(["setCookieDomain", "*.{{base_domain}}"]); | ||||
| _paq.push(["setDomains", ["*.{{base_domain}}"]]); | ||||
| _paq.push(["enableCrossDomainLinking"]); | ||||
| _paq.push(["trackPageView"]); | ||||
| _paq.push(["trackAllContentImpressions"]); | ||||
| _paq.push(["enableLinkTracking"]); | ||||
| (function() { | ||||
|   var u="//{{ domains | get_domain('matomo') }}/"; | ||||
|   _paq.push(["setTrackerUrl", u+"matomo.php"]); | ||||
|   _paq.push(["setSiteId", "{{matomo_site_id}}"]); | ||||
|   var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; | ||||
|   g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s); | ||||
| })(); | ||||
|  | ||||
| {% if enable_debug | bool %} | ||||
| console.log("Matomo is loaded."); | ||||
| {% endif %} | ||||
		Reference in New Issue
	
	Block a user