mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
pass trending_algorithm to ga
This commit is contained in:
parent
1984ee585f
commit
bb1c12b050
2 changed files with 16 additions and 1 deletions
|
@ -202,6 +202,9 @@ const analytics: Analytics = {
|
||||||
openUrlEvent: (url: string) => {
|
openUrlEvent: (url: string) => {
|
||||||
sendGaEvent('Engagement', 'Open-Url', url);
|
sendGaEvent('Engagement', 'Open-Url', url);
|
||||||
},
|
},
|
||||||
|
trendingAlgorithmEvent: (trendingAlgorithm: string) => {
|
||||||
|
sendGaEvent('Engagement', 'Trending-Algorithm', trendingAlgorithm);
|
||||||
|
},
|
||||||
startupEvent: () => {
|
startupEvent: () => {
|
||||||
sendGaEvent('Startup', 'Startup');
|
sendGaEvent('Startup', 'Startup');
|
||||||
},
|
},
|
||||||
|
|
|
@ -329,7 +329,19 @@ export function doDaemonReady() {
|
||||||
// TODO: call doFetchDaemonSettings, then get usage data, and call doAuthenticate once they are loaded into the store
|
// TODO: call doFetchDaemonSettings, then get usage data, and call doAuthenticate once they are loaded into the store
|
||||||
const shareUsageData = window.localStorage.getItem(SHARE_INTERNAL) === 'true' || IS_WEB;
|
const shareUsageData = window.localStorage.getItem(SHARE_INTERNAL) === 'true' || IS_WEB;
|
||||||
|
|
||||||
dispatch(doAuthenticate(appVersion, undefined, undefined, shareUsageData));
|
dispatch(
|
||||||
|
doAuthenticate(appVersion, undefined, undefined, shareUsageData, status => {
|
||||||
|
const trendingAlgorithm =
|
||||||
|
status &&
|
||||||
|
status.wallet &&
|
||||||
|
status.wallet.connected_features &&
|
||||||
|
status.wallet.connected_features.trending_algorithm;
|
||||||
|
|
||||||
|
if (trendingAlgorithm) {
|
||||||
|
analytics.trendingAlgorithmEvent(trendingAlgorithm);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
dispatch({ type: ACTIONS.DAEMON_READY });
|
dispatch({ type: ACTIONS.DAEMON_READY });
|
||||||
|
|
||||||
// @if TARGET='app'
|
// @if TARGET='app'
|
||||||
|
|
Loading…
Add table
Reference in a new issue