Improve monitoring script ingress
This commit is contained in:
parent
47f6775cab
commit
902e5a8324
@ -15,8 +15,8 @@ from ..tasks import ingress_request
|
||||
def ingress(request, service_uuid, identifier, tracker, payload):
|
||||
time = timezone.now()
|
||||
client_ip, is_routable = get_client_ip(request)
|
||||
location = request.META.get("HTTP_REFERER") or ""
|
||||
user_agent = request.META.get("HTTP_USER_AGENT") or ""
|
||||
location = request.META.get("HTTP_REFERER", "").strip()
|
||||
user_agent = request.META.get("HTTP_USER_AGENT", "").strip()
|
||||
|
||||
ingress_request.delay(
|
||||
service_uuid,
|
||||
|
@ -14,8 +14,8 @@
|
||||
<p>Place the following snippet at the end of the <code><body></code> tag on any page you'd like to track.</p>
|
||||
<div class="card ~neutral !high font-mono text-sm">
|
||||
{% filter force_escape %}<noscript><img
|
||||
src="//{{request.site.domain}}/ingress/{{object.uuid}}/pixel.gif"></noscript>
|
||||
<script src="//{{request.site.domain}}/ingress/{{object.uuid}}/identifier/script.js"></script>
|
||||
src="//{{request.site.domain}}{% url 'ingress:endpoint_pixel' object.uuid %}"></noscript>
|
||||
<script src="//{{request.site.domain}}{% url 'ingress:endpoint_script' object.uuid %}"></script>
|
||||
{% endfilter %}
|
||||
</div>
|
||||
<hr class="sep h-4">
|
||||
|
Loading…
Reference in New Issue
Block a user