Skip to content

Commit

Permalink
πŸ“ˆ Add crisp event log
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Dec 19, 2024
1 parent f827fc2 commit d4ea749
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions stores/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ export const useWalletStore = defineStore('wallet', () => {
if (!connection) { return }
accounts.value = connection.accounts
signer.value = connection.offlineSigner as (OfflineAminoSigner & OfflineDirectSigner)
useTrackEvent('login', {
method: connection.method
})
const method = connection.method
useTrackEvent('login', { method })
if (window.$crisp) {
const wallet = accounts.value[0]?.address
window.$crisp.push(['set', 'session:data', [[['like_wallet', wallet]]]])
window.$crisp.push(['set', 'session:data', [[['login_method', method]]]])
}
}

async function handleConnectorRedirect (
Expand Down

0 comments on commit d4ea749

Please sign in to comment.