37 Commits

Author SHA1 Message Date
e61346cdf3 Analytics: Use unsigned ints
Also change type to 64 bit wherever needed.

The cpuFreq value seems to be too high, discarding it for now.
2021-08-12 00:12:02 +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
02f7ab4741 AnalyticsStorage: Add an API to fetch the events as a transaction 2021-08-11 10:13:20 +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
f14e754b74 anaytics example: Use the right port
This took me way way too long to figure out
2021-08-09 18:18:03 +02:00
0e2adf8bb6 Analytics: Add sample network code
This doesn't seem to work. I'm not sure what I've done wrong with
google cloud run.
2021-08-09 17:23:18 +02:00
371bd996ec Add AnalyticsStorage class
A simple way to store the events. Since we are using protobufs, we can
efficiently store events in a binary form.
2021-08-09 15:07:17 +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
b0edb257c6 Analytics: Cleanup
I don't see any way of getting the app install source.

Run the formatter on the rest
2021-08-03 16:25:15 +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
5f3ef0ce06 Analytics: Add service + go options 2021-08-03 13:48:26 +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
a0211b35c2 Analytics: Add code to build the device Info
This fills the protobuf structure
2021-08-02 15:23:03 +02:00
7c440fd1c0 Analytics: Add a protobuf file
First version
2021-08-02 15:21:42 +02:00
357cedee52 Remove plausible experiment
Not being used, and it's easier to just run our own db. Plausible is not
built for app analytics.
2021-08-02 15:21:37 +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
d4a345ea89 Avoid using 'dart:io' wherever possible
This gets us one step closer to supporting the web.
2021-07-01 01:46:01 +02:00
0d3f7858df Add experimental flags to use Dart-git for merge / add / commit 2021-06-29 17:59:06 +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
7935b92725 Analyics: Clear old notes 2021-04-26 09:06:51 +02:00
414785cbc1 Plausible: Test if the events are being tracked properly
It works!
2021-04-26 09:06:51 +02:00
e5bedaaa08 Add serialization for Plausible Events 2021-04-26 09:06:51 +02:00
813b4c8436 Move analytics code to its own folder 2021-04-26 09:06:51 +02:00