fix: telemetry capture on client side

This commit is contained in:
Jannat Patel
2023-05-18 14:26:48 +05:30
parent 611cc4d5a1
commit 93f0f8ab44
5 changed files with 31 additions and 2 deletions

View File

@@ -7,3 +7,16 @@
Hello, world!
{% endblock %}
{% endblock %}
{%- block script -%}
{{ super() }}
{% if frappe.get_system_settings("enable_telemetry") %}
{% set telemetry_boot_info = get_telemetry_boot_info() %}
<script>
const telemetry_boot_info = {{ get_telemetry_boot_info() }}
if (telemetry_boot_info && Object.keys(telemetry_boot_info).length)
Object.assign(frappe.boot, telemetry_boot_info)
</script>
{{ include_script("telemetry.bundle.js") }}
{% endif %}
{%- endblock -%}