From 9eb0bd4df2146dcac4bac140359bc49f28690ffa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 14 Aug 2023 23:37:15 +0100 Subject: [PATCH] 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. --- lgsm/modules/info_stats.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index 5512007ba..0c621485a 100644 --- a/lgsm/modules/info_stats.sh +++ b/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}\", } } ]