mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-25 00:00:26 +08:00
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.
This commit is contained in:
@ -70,15 +70,15 @@ class Analytics {
|
||||
}) {
|
||||
_global = Analytics();
|
||||
_global!.enabled = enable;
|
||||
_global!.sessionId =
|
||||
_global!._sessionId =
|
||||
DateTime.now().millisecondsSinceEpoch.toRadixString(16);
|
||||
|
||||
var p = pref.getString("pseudoId");
|
||||
if (p == null) {
|
||||
_global!.pseudoId = const Uuid().v4();
|
||||
pref.setString("pseudoId", _global!.pseudoId);
|
||||
_global!._pseudoId = const Uuid().v4();
|
||||
pref.setString("pseudoId", _global!._pseudoId);
|
||||
} else {
|
||||
_global!.pseudoId = p;
|
||||
_global!._pseudoId = p;
|
||||
}
|
||||
|
||||
return _global!;
|
||||
@ -86,8 +86,8 @@ class Analytics {
|
||||
|
||||
static Analytics? get instance => _global!;
|
||||
|
||||
late String sessionId;
|
||||
late String pseudoId;
|
||||
late String _sessionId;
|
||||
late String _pseudoId;
|
||||
var userProps = <String, String>{};
|
||||
|
||||
Future<void> log(
|
||||
@ -125,9 +125,9 @@ class Analytics {
|
||||
name: name,
|
||||
date: Int64(DateTime.now().millisecondsSinceEpoch ~/ 1000),
|
||||
params: params,
|
||||
pseudoId: pseudoId,
|
||||
pseudoId: _pseudoId,
|
||||
userProperties: userProps,
|
||||
sessionID: sessionId,
|
||||
sessionID: _sessionId,
|
||||
userFirstTouchTimestamp: null,
|
||||
);
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'package:in_app_purchase/store_kit_wrappers.dart';
|
||||
import 'package:universal_io/io.dart' show Platform;
|
||||
|
||||
import 'package:gitjournal/analytics/analytics.dart';
|
||||
import 'package:gitjournal/app.dart';
|
||||
import 'package:gitjournal/error_reporting.dart';
|
||||
import 'package:gitjournal/features.dart';
|
||||
@ -185,7 +184,7 @@ Future<DateTime?> getExpiryDate(
|
||||
var body = {
|
||||
'receipt': receipt,
|
||||
"sku": sku,
|
||||
'pseudoId': Analytics.instance?.pseudoId,
|
||||
'pseudoId': '',
|
||||
'is_purchase': isPurchase,
|
||||
};
|
||||
Log.i("getExpiryDate ${json.encode(body)}");
|
||||
|
Reference in New Issue
Block a user