NIAEFEUP / uni

Mobile app designed to help students of the University of Porto to manage their academic life.
GNU General Public License v3.0
46 stars 15 forks source link

Plausible custom User Agent #1239

Closed thePeras closed 3 months ago

thePeras commented 4 months ago

Currently, Plausible is not recognizing users devices.

Screenshot 2024-05-31 at 18 42 31 Screenshot 2024-05-31 at 18 42 39

Dingging into the code of the package, I found this:

  // Get and set device infos
  String version = Platform.operatingSystemVersion.replaceAll('"', '');

  if (userAgent == "") {
    userAgent = "Mozilla/5.0 ($version; rv:53.0) Gecko/20100101 Chrome/53.0";
  }

Which is maybe the cause of this.

To fix it, we can instance Plausible with the user's User Agent.