Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed XML error in Firefox. Renamed telemetry env var.

Mike Cao281671b792eb
diff --git a/scripts/postbuild.js b/scripts/postbuild.js
index c992884bd..6372bd65e 100644
--- a/scripts/postbuild.js
+++ b/scripts/postbuild.js
@@ -2,7 +2,7 @@ require('dotenv').config();
const sendTelemetry = require('./telemetry');
async function run() {
- if (!process.env.TELEMETRY_DISABLE) {
+ if (!process.env.DISABLE_TELEMETRY) {
await sendTelemetry();
}
}
diff --git a/tracker/index.js b/tracker/index.js
index 312632d9d..a5012b718 100644
--- a/tracker/index.js
+++ b/tracker/index.js
@@ -48,7 +48,7 @@ import { removeTrailingSlash } from '../lib/url';
const post = (url, data, callback) => {
const req = new XMLHttpRequest();
req.open('POST', url, true);
- req.setRequestHeader('Content-Type', 'text/plain');
+ req.setRequestHeader('Content-Type', 'application/json');
req.onreadystatechange = () => {
if (req.readyState === 4) {