From d1ad5bfcc81a78f3630464bdffa9e507e917520c Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 23 Jan 2024 15:41:32 +0530 Subject: [PATCH] chore: capture basic telemetry --- crm/www/crm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crm/www/crm.py b/crm/www/crm.py index 9c15f3f6..05e4014b 100644 --- a/crm/www/crm.py +++ b/crm/www/crm.py @@ -2,8 +2,8 @@ # GNU GPLv3 License. See license.txt from __future__ import unicode_literals - import frappe +from frappe.utils.telemetry import capture no_cache = 1 @@ -11,4 +11,6 @@ no_cache = 1 def get_context(context): csrf_token = frappe.sessions.get_csrf_token() frappe.db.commit() - context.csrf_token = csrf_token \ No newline at end of file + if frappe.session.user != "Guest": + capture("active_site", "crm") + context.csrf_token = csrf_token