PriviMetrics
Version 1.0.9 • 43 files • 278.98 KB
Files
.last_check
admin.php
assets/.htaccess
assets/dashboard-chart.php
assets/dashboard-logic.php
assets/dashboard-modals.php
assets/dashboard-tables.php
assets/dashboard-template.php
assets/trends-template.php
chosen-limits.php
dashboard.php
data/.htaccess
extensions-load.php
extensions.php
extensions.xml
extensions/.htaccess
extensions/extensions_off.txt
functions.php
getCountryFrom/db-ip.php
getCountryFrom/geo-lite.php
getCountryFrom/ip-api-com.php
getCountryFrom/ip-info.php
getCountryFrom/ip-stack.php
getCountryFrom/ip2location-io.php
getCountryFrom/privacy-friendly.php
index.html
install.php
limits-options.php
new_version.php
privimetrics-div.js
privimetrics.php
public.php
scripts.js
settings-config.php
settings.php
signup.php
storage.php
styles-mobile.css
styles.css
trends.css
trends.php
updater/index.php
version.txt
privimetrics-div.js
;(() => {
/* =========================================================
FIND CURRENT SCRIPT
========================================================= */
var s = document.currentScript
if (!s) return
var code = s.getAttribute("data-privimetrics-code")
if (!code) return
/* =========================================================
CREATE HIDDEN DIV
========================================================= */
var noTrackIp = s.getAttribute("data-not-track-ip") === "true"
var divId = "privimetrics-analytics-system-data"
var d = document.getElementById(divId)
if (!d) {
d = document.createElement("div")
d.id = divId
d.style.display = "none"
var endpoint = s.src.replace(/\/[^/]+$/, "/privimetrics.php")
d.setAttribute("data-k", code)
d.setAttribute("data-e", endpoint)
document.documentElement.appendChild(d)
}
/* =========================================================
CREATE TRACKING IMG (READS FROM DIV)
========================================================= */
function sendTracking() {
try {
var k = d.getAttribute("data-k")
var e = d.getAttribute("data-e")
if (!k || !e) return
var tz = ""
try {
tz = Intl.DateTimeFormat().resolvedOptions().timeZone || ""
} catch (_) {}
var lang = navigator.language || navigator.userLanguage || ""
var img = document.createElement("img")
img.width = 1
img.height = 1
img.style.display = "none"
img.src =
e +
"?t=" +
encodeURIComponent(k) +
"&p=" +
encodeURIComponent(window.location.href) +
"&title=" +
encodeURIComponent(document.title || "") +
"&r=" +
encodeURIComponent(document.referrer || "d") +
"&js=1" +
"&track-ip=" +
encodeURIComponent(noTrackIp ? "false" : "true") +
"&tz=" +
encodeURIComponent(tz) +
"&lang=" +
encodeURIComponent(lang) +
"&z=" +
Math.random()
document.documentElement.appendChild(img)
} catch (_) {}
}
if (document.readyState === "complete" || document.readyState === "interactive") {
sendTracking()
} else {
document.addEventListener("DOMContentLoaded", sendTracking)
}
})()