37 Commits

Author SHA1 Message Date
d210773b06 Upgrade deps + android sdk version to get it to build
I'm still having some problems with the version of gradle + kotlin, but
this is a step in the right direction.
2024-08-14 23:23:24 +02:00
657721adc6 Update dart-git and stop using the Result class
Instead we're going to move back to standard exceptions.

Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code

I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
dd8e251aa1 Add a basic Analytics Controller 2021-09-27 18:51:39 +02:00
8482815064 Analytics: get the correct value for enabled / disabled 2021-09-18 16:48:23 +02:00
33a731a3d7 Add reuse licensing to files in lib 2021-09-15 13:06:43 +02:00
a1d96992e3 Analytics: Make the code clearer 2021-09-13 17:32:33 +02:00
0a2c88ad9d Analytics: Report network errors to Sentry
Just for now, so I can better understand the errors.
2021-08-30 22:58:07 +02:00
7ff61d2f41 Disable dart-code-metrics for now
Even though I'm not using v4.2, the return-value rule is still being
applied with `flutter analyze` though not consistently.

For now, lets disable this, as there are 300+ warnings to fix.
2021-08-25 11:17:21 +02:00
ddf3ef021a Analytics: Make sessionID an int
It doesn't need to be a string.

Also remove the userFirstTouchTimestamp, it isn't being used.
2021-08-17 00:27:34 +02:00
7785dda682 Analytics: simplify code 2021-08-17 00:19:53 +02:00
b42538192d Analytics: Move firebase lab detection into analytics package
This way the app.dart file has minimal logic.
2021-08-17 00:10:53 +02:00
0a5e0bcf43 Analytics: Add config class
Move parts out of AppSettings
2021-08-16 23:55:14 +02:00
e212583e23 Analytics: Fix psuedoId 2021-08-16 13:36:43 +02:00
6d6711c15b Analytics: Split events to their own file 2021-08-16 13:24:27 +02:00
6ae11d386d Analytics: Move settings into Analytics
Lots of code cleanups as well
2021-08-16 13:23:26 +02:00
103197b886 Analytics: Send to backend when possible 2021-08-12 00:10:18 +02:00
9efc8cfcfa Analytics: Hook up the storage
Add events to the storage independent of Analytics being enabled or not.
The idea is that the user can later decide to enable the analytics and
send all the old events.
2021-08-11 11:54:32 +02:00
da7d6e9bbf Log when Analytics/Crash Reporting is disabled / enabled 2021-08-10 14:21:53 +02:00
0328ff4798 Fix Analytics null check
Fixes APP-1BW
2021-08-10 11:25:29 +02:00
54c36af040 Analytics: decouple from error reporting 2021-08-09 11:53:24 +02:00
7bbd79343a IAP: Do not send the psuedoId
Lets keep the analytics completely separate from everything else. I
don't want to have the ability to map analytics with IAP. The latter can
have personally identifiable information.
2021-08-09 11:44:53 +02:00
e2992b3603 Analytics: Fix session ID 2021-08-03 16:53:22 +02:00
0a7eb4d517 Move pseudoId to Analytics
From AppSettings
2021-08-03 16:08:28 +02:00
c04af8480d Analytics: Capture current screen 2021-08-03 15:57:37 +02:00
d0efbbf6ad Analytics: build an event 2021-08-03 15:54:30 +02:00
80d7a8246a Analytics: Simplify code 2021-08-03 14:02:12 +02:00
badd4ef1e5 Analytics: Allow calls to logEvent even if we haven't been initialzed 2021-08-02 16:27:45 +02:00
0b7195960c Split Analytics Route Observer into its own file 2021-08-02 15:42:15 +02:00
17d2c2db0d Analytics: cleanup
This way its less dependant on GitJournal and can be used in other
projects.
2021-08-02 15:36:58 +02:00
3a71cca202 Move logging code to its own folder 2021-07-30 14:39:13 +02:00
2505d00dfb Replace dart:io with universal_io
Platform from dart:io cannot be used on the web for reasons. And this
way we get a fake File/Directory class which we can use for atleast
running the web version, even if it won't work.
2021-07-30 11:39:26 +02:00
d07acac53f Use device_info_plus instead of device_info
It now contains the toMap functions, so we can delete a lot of code.
2021-07-07 16:29:08 +02:00
17dd93451f Remove firebase analytics
Sadly, even when firebase analytics is disabled, it still sends some
data to Google's servers and there seems to be no way to disable it.
GitJournal gives its users an option to disable all analytics, which
clearly can't be implemented as long as we use Firebase.

Therefore there are 2 options -
1. Remove the option of disabling all analytics
2. Remove firebase analytics.

I'm choosing option (2), as it seems wrong to remove the option to
disable analytics, as I know a number of users who have disabled
analytics.

Currently I'm mostly using analytics to measure how well the marketting
is doing, and to see which settings are being used. Disabling the
analytics would make this much much harder, but I guess it's a greater
push for me to find an alternative / create one.

Fixes #506
Related to #105
2021-06-07 12:21:41 +02:00
cce1f787d3 Don't even touch the firebase code if analytics are disabled
The anlaytics fuctions do not do anything when analytics collection is
disabled, and I've verified that I do not get any events in the firebase
dashboard.

However, to be on the safer side lets not even touch the code.

Related to #506
2021-06-06 09:53:24 +02:00
2c2a3380a6 Analytics: Port to null safety 2021-05-17 23:12:59 +02:00
37877d5336 Disable analytics on Desktop
firebase isn't available there, and this just results in more errors.
2021-05-11 16:10:45 +02:00
813b4c8436 Move analytics code to its own folder 2021-04-26 09:06:51 +02:00