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) => {
|
||||
sendGaEvent('Engagement', 'Open-Url', url);
|
||||
},
|
||||
trendingAlgorithmEvent: (trendingAlgorithm: string) => {
|
||||
sendGaEvent('Engagement', 'Trending-Algorithm', trendingAlgorithm);
|
||||
},
|
||||
startupEvent: () => {
|
||||
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
|
||||
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 });
|
||||
|
||||
// @if TARGET='app'
|
||||
|
|
Loading…
Reference in a new issue