mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 19:29:54 +02:00
Add data tracking for wallet setup
This commit is contained in:
parent
4334bf8222
commit
668f6d50b5
4 changed files with 64 additions and 0 deletions
|
@ -48,6 +48,16 @@ Rectangle {
|
||||||
if (root.activeView !== "walletSetup") {
|
if (root.activeView !== "walletSetup") {
|
||||||
root.activeView = "walletSetup";
|
root.activeView = "walletSetup";
|
||||||
commerce.resetLocalWalletOnly();
|
commerce.resetLocalWalletOnly();
|
||||||
|
var timestamp = new Date();
|
||||||
|
walletSetup.startingTimestamp = timestamp;
|
||||||
|
var data = {
|
||||||
|
"timestamp": timestamp,
|
||||||
|
"setupAttemptID": guid(),
|
||||||
|
"setupFlowVersion": walletSetup.setupFlowVersion,
|
||||||
|
"referrer": walletSetup.referrer,
|
||||||
|
"currentDomain": (AddressManager.placename || AddressManager.hostname || '') + (AddressManager.pathname ? AddressManager.pathname.match(/\/[^\/]+/)[0] : '')
|
||||||
|
}
|
||||||
|
UserActivityLogger.logAction("commerceWalletSetupStarted", data);
|
||||||
}
|
}
|
||||||
} else if (walletStatus === 2) {
|
} else if (walletStatus === 2) {
|
||||||
if (root.activeView !== "passphraseModal") {
|
if (root.activeView !== "passphraseModal") {
|
||||||
|
|
|
@ -31,6 +31,9 @@ Item {
|
||||||
property bool hasShownSecurityImageTip: false;
|
property bool hasShownSecurityImageTip: false;
|
||||||
property string referrer;
|
property string referrer;
|
||||||
property string keyFilePath;
|
property string keyFilePath;
|
||||||
|
property date startingTimestamp;
|
||||||
|
readonly property int setupFlowVersion: 1;
|
||||||
|
readonly property var setupStepNames: [ "Setup Prompt", "Security Image Selection", "Passphrase Selection", "Private Keys Ready" ];
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
@ -67,6 +70,18 @@ Item {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onActiveViewChanged: {
|
||||||
|
var timestamp = new Date();
|
||||||
|
var currentStepNumber = root.activeView.substring(5);
|
||||||
|
var data = {
|
||||||
|
"timestamp": timestamp,
|
||||||
|
"secondsElapsed": (root.startingTimestamp - timestamp),
|
||||||
|
"currentStepNumber": currentStepNumber,
|
||||||
|
"currentStepName": root.setupStepNames[currentStepNumber]
|
||||||
|
}
|
||||||
|
UserActivityLogger.logAction("commerceWalletSetupProgress", data);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// TITLE BAR START
|
// TITLE BAR START
|
||||||
//
|
//
|
||||||
|
@ -730,6 +745,13 @@ Item {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
root.hasShownSecurityImageTip = false;
|
root.hasShownSecurityImageTip = false;
|
||||||
sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""});
|
sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""});
|
||||||
|
|
||||||
|
var timestamp = new Date();
|
||||||
|
var data = {
|
||||||
|
"timestamp": timestamp,
|
||||||
|
"secondsToComplete": (root.startingTimestamp - timestamp)
|
||||||
|
}
|
||||||
|
UserActivityLogger.logAction("commerceWalletSetupFinished", data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,3 +113,32 @@ void UserActivityLoggerScriptingInterface::commerceEntityRezzed(QString marketpl
|
||||||
payload["type"] = type;
|
payload["type"] = type;
|
||||||
doLogAction("commerceEntityRezzed", payload);
|
doLogAction("commerceEntityRezzed", payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UserActivityLoggerScriptingInterface::commerceWalletSetupStarted(float timestamp, QString setupAttemptID, int setupFlowVersion, QString referrer, QString currentDomain) {
|
||||||
|
QJsonObject payload;
|
||||||
|
payload["timestamp"] = timestamp;
|
||||||
|
payload["setupAttemptID"] = setupAttemptID;
|
||||||
|
payload["setupFlowVersion"] = setupFlowVersion;
|
||||||
|
payload["referrer"] = referrer;
|
||||||
|
payload["currentDomain"] = currentDomain;
|
||||||
|
qDebug() << "ZRF" << payload;
|
||||||
|
//doLogAction("commerceWalletSetupStarted", payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UserActivityLoggerScriptingInterface::commerceWalletSetupProgress(float timestamp, float secondsElapsed, int currentStepNumber, QString currentStepName) {
|
||||||
|
QJsonObject payload;
|
||||||
|
payload["timestamp"] = timestamp;
|
||||||
|
payload["secondsElapsed"] = secondsElapsed;
|
||||||
|
payload["currentStepNumber"] = currentStepNumber;
|
||||||
|
payload["currentStepName"] = currentStepName;
|
||||||
|
qDebug() << "ZRF" << payload;
|
||||||
|
//doLogAction("commerceWalletSetupProgress", payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UserActivityLoggerScriptingInterface::commerceWalletSetupFinished(float timestamp, float secondsToComplete) {
|
||||||
|
QJsonObject payload;
|
||||||
|
payload["timestamp"] = timestamp;
|
||||||
|
payload["secondsToComplete"] = secondsToComplete;
|
||||||
|
qDebug() << "ZRF" << payload;
|
||||||
|
//doLogAction("commerceWalletSetupFinished", payload);
|
||||||
|
}
|
||||||
|
|
|
@ -36,6 +36,9 @@ public:
|
||||||
Q_INVOKABLE void commercePurchaseSuccess(QString marketplaceID, int cost, bool firstPurchaseOfThisItem);
|
Q_INVOKABLE void commercePurchaseSuccess(QString marketplaceID, int cost, bool firstPurchaseOfThisItem);
|
||||||
Q_INVOKABLE void commercePurchaseFailure(QString marketplaceID, int cost, bool firstPurchaseOfThisItem, QString errorDetails);
|
Q_INVOKABLE void commercePurchaseFailure(QString marketplaceID, int cost, bool firstPurchaseOfThisItem, QString errorDetails);
|
||||||
Q_INVOKABLE void commerceEntityRezzed(QString marketplaceID, QString source, QString type);
|
Q_INVOKABLE void commerceEntityRezzed(QString marketplaceID, QString source, QString type);
|
||||||
|
Q_INVOKABLE void commerceWalletSetupStarted(float timestamp, QString setupAttemptID, int setupFlowVersion, QString referrer, QString currentDomain);
|
||||||
|
Q_INVOKABLE void commerceWalletSetupProgress(float timestamp, float secondsElapsed, int currentStepNumber, QString currentStepName);
|
||||||
|
Q_INVOKABLE void commerceWalletSetupFinished(float timestamp, float secondsToComplete);
|
||||||
private:
|
private:
|
||||||
void doLogAction(QString action, QJsonObject details = {});
|
void doLogAction(QString action, QJsonObject details = {});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue