Browse Source

feat: add country code to Google Analytics tracking

This commit adds the country code parameter to the Google Analytics tracking request in the `info_stats.sh` file. It also includes various server statistics such as CPU usage, memory usage, disk usage, distro name, game name, RAM usage, server CPU details, server disk details, server RAM details, and version information.
pull/4295/head
Daniel Gibbs 2 years ago
parent
commit
9eb0bd4df2
  1. 13
      lgsm/modules/info_stats.sh

13
lgsm/modules/info_stats.sh

@ -68,21 +68,22 @@ curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=A-OzP02TSMW
{
\"name\": \"LinuxGSM\",
\"params\": {
\"country\":\"${countrycode}\"
\"cpuusedmhzroundup\": \"${cpuusedmhzroundup}MHz\",
\"memusedroundup\": \"${memusedroundup}MB\",
\"serverfilesdu\": \"${serverfilesdu}\",
\"uuidhardware\": \"${uuidhardware}\",
\"uuidinstall\": \"${uuidinstall}\",
\"uuidinstance\": \"${uuidinstance}\",
\"diskused\": \"${serverfilesdu}\",
\"distro\": \"${distroname}\",
\"game\": \"${gamename}\",
\"memusedroundup\": \"${memusedroundup}MB\",
\"ramused\": \"${memusedroundup}MB\",
\"servercpu\": \"${cpumodel} ${cpucores} cores\",
\"servercpufreq\": \"${cpufreqency} x${cpucores}\",
\"serverdisk\": \"${totalspace}\",
\"serverfilesdu\": \"${serverfilesdu}\",
\"serverram\": \"${physmemtotal}\",
\"version\": \"${version}\"
\"uuidhardware\": \"${uuidhardware}\",
\"uuidinstall\": \"${uuidinstall}\",
\"uuidinstance\": \"${uuidinstance}\",
\"version\": \"${version}\",
}
}
]

Loading…
Cancel
Save