@@ -2,6 +2,7 @@
|
|
2
2
|
import { ContextEvent, ContextRegistry } from "./engine_context_registry";
|
3
3
|
import { IContext } from "./engine_types";
|
4
4
|
import { logoSVG } from "./assets";
|
5
|
+
import { GENERATOR, VERSION } from "./engine_constants";
|
5
6
|
|
6
7
|
const debug = getParam("debuglicense");
|
7
8
|
|
@@ -34,6 +35,7 @@
|
|
34
35
|
|
35
36
|
ContextRegistry.registerCallback(ContextEvent.ContextRegistered, evt => {
|
36
37
|
showLicenseInfo(evt.context);
|
38
|
+
sendUsageMessageToAnalyticsBackend();
|
37
39
|
});
|
38
40
|
|
39
41
|
let licenseCheckPromise: Promise<void>;
|
@@ -82,7 +84,6 @@
|
|
82
84
|
insertNonCommercialUseHint(ctx);
|
83
85
|
}, 1000);
|
84
86
|
});
|
85
|
-
sendUsageMessageToAnalyticsBackend();
|
86
87
|
}
|
87
88
|
|
88
89
|
function insertNonCommercialUseHint(ctx: IContext) {
|
@@ -297,8 +298,8 @@
|
|
297
298
|
|
298
299
|
let endpoint = "api/v1/register/web-request";
|
299
300
|
if (!analyticsUrl.endsWith("/")) endpoint = "/" + endpoint;
|
300
|
-
const
|
301
|
-
const finalUrl = `${analyticsUrl}${endpoint}?
|
301
|
+
const license = NEEDLE_ENGINE_LICENSE_TYPE;
|
302
|
+
const finalUrl = `${analyticsUrl}${endpoint}?license=${license}&url=${encodeURIComponent(currentUrl)}&hostname=${encodeURIComponent(window.location.hostname)}&pathname=${encodeURIComponent(window.location.pathname)}&search=${encodeURIComponent(window.location.search)}&hash=${encodeURIComponent(window.location.hash)}&version=${VERSION}}&generator=${GENERATOR}`;
|
302
303
|
if (debug) console.log("Sending non-commercial usage message to analytics backend", finalUrl);
|