Skip to content

Commit 856ada4

Browse files
committed
tracking: anonymous / random client id
1 parent 74dc2bf commit 856ada4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/network/sta.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@
1414

1515
MoonLight sends **anonymous** usage data to Google Analytics when it restarts.
1616

17+
You can **opt out** at any time by disabling Track analytics in the settings.
18+
1719
The data collected consists of:
1820

1921
* Country – e.g. France, determined via ip-api.com; only the country field is extracted.
2022
* Firmware – e.g. esp32-s3-devkitc-1-n16r8v
2123
* Board model – e.g. QuinLED DigQuad, based on board presets (not yet implemented)
2224
* MoonLight version – e.g. 0.6.0
2325

24-
No other information is collected or stored.
26+
No personal data, IP addresses, or identifiers that can trace back to an individual are collected, stored, or shared.
27+
Each event is sent with a random, anonymous client ID, so usage cannot be linked to a specific device or person.
2528

2629
We use this anonymous data to understand how MoonLight is being used, identify which hardware and versions are most common, and prioritize future development and improvements accordingly.
2730

2831
The data is sent only to Google Analytics, which processes it to provide aggregated usage insights.
2932

30-
You can **opt out** at any time by disabling Track analytics in the settings.
33+
This data is fully anonymous and handled in a way that meets the principles of the GDPR and other global privacy standards.

lib/framework/WiFiSettingsService.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,11 @@ bool sendAnalytics() {
197197

198198
// ESP_LOGI(SVK_TAG, "send Event %s to Google Analytics", eventName.c_str());
199199

200-
// full 48-bit MAC for client_id
201-
uint64_t mac = ESP.getEfuseMac();
202-
String client_id = String((uint32_t)(mac >> 32), HEX) + String((uint32_t)mac, HEX);
203-
client_id.toLowerCase();
200+
String client_id = "";
201+
for (int i = 0; i < 16; i++) {
202+
uint8_t n = random(0, 16);
203+
client_id += String(n, HEX);
204+
}
204205

205206
String eventName = BUILD_TARGET;
206207
eventName.toLowerCase(); // GA4 requires lowercase

0 commit comments

Comments
 (0)