File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ METRICS_EXPORTER_ALLOWED_IP=% # IP address with access to metrics (use % for all
2323
2424# enable visitor tracking
2525VISITOR_TRACKING_ENABLED = false
26+ VISITOR_TRACKING_SERVICE_NAME = paste.becvar.xyz
2627VISITOR_TRACKING_URL = https://admin.becvar.xyz/api/monitoring/visitor/tracking
2728
2829# database config
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ METRICS_EXPORTER_ALLOWED_IP=172.18.0.1 # IP address with access to metrics (use
2323
2424# enable visitor tracking
2525VISITOR_TRACKING_ENABLED = false
26+ VISITOR_TRACKING_SERVICE_NAME = paste.becvar.xyz
2627VISITOR_TRACKING_URL = https://admin.becvar.xyz/api/monitoring/visitor/tracking
2728
2829# database config
Original file line number Diff line number Diff line change 3636 ' Content-Type' : ' application/json'
3737 },
3838 body: JSON .stringify ({
39- service_name: ' paste.becvar.xyz ' ,
39+ service_name: ' {{ getEnvValue("VISITOR_TRACKING_SERVICE_NAME") }} ' ,
4040 referer: visitorReferer
4141 })
4242 })
Original file line number Diff line number Diff line change 1111</head >
1212<body >
1313 {% block body %}{% endblock %}
14-
15- {# VISITOR TRACKING SYSTEM #}
16- {% if getEnvValue(' VISITOR_TRACKING_ENABLED' ) == ' true' %}
17- <script >
18- const visitorReferer = document .referrer || ' Unknown'
19- fetch (' {{ getEnvValue("VISITOR_TRACKING_URL") }}' , {
20- method: ' POST' ,
21- headers: {
22- ' Content-Type' : ' application/json'
23- },
24- body: JSON .stringify ({
25- service_name: ' paste.becvar.xyz' ,
26- referer: visitorReferer
27- })
28- })
29- </script >
30- {% endif %}
3114</body >
3215</html >
You can’t perform that action at this time.
0 commit comments