fix: Respect "Do Not Track" settings
Don't offer telemetry as option if DNT is set in browser. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
This commit is contained in:
parent
b56cbdfff8
commit
86e4a3a6e1
2 changed files with 2 additions and 2 deletions
|
|
@ -404,7 +404,7 @@ frappe.setup.slides_settings = [
|
|||
fieldname: "enable_telemetry",
|
||||
label: __("Allow sending usage data for improving applications"),
|
||||
fieldtype: "Check",
|
||||
default: 1,
|
||||
default: cint(frappe.telemetry.can_enable()),
|
||||
depends_on: "eval:frappe.telemetry.can_enable()",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class TelemetryManager {
|
|||
}
|
||||
|
||||
can_enable() {
|
||||
return Boolean(this.telemetry_host && this.project_id);
|
||||
return Boolean(this.telemetry_host && this.project_id && !cint(navigator.doNotTrack));
|
||||
}
|
||||
|
||||
send_heartbeat() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue