1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-23 15:01:14 +02:00

consolidate loggedin events

This commit is contained in:
Kushagra Gour
2024-05-10 14:20:28 +05:30
parent a525a5e581
commit b64163f59c
2 changed files with 7 additions and 2 deletions

View File

@@ -19,7 +19,13 @@ export const authh = {
},
async login(providerName) {
const onSuccess = () => {
trackEvent('fn', 'loggedIn', providerName);
trackEvent(
'fn',
'loggedIn',
providerName,
window.IS_EXTENSION ? 'extension' : 'web'
);
// Save to recommend next time
window.db.local.set({
lastAuthProvider: providerName

View File

@@ -220,7 +220,6 @@ export default class App extends Component {
this.setState({ user: newUser });
window.user = newUser;
// window.localStorage.setItem('user', authUser);
trackEvent('fn', 'loggedIn', window.IS_EXTENSION ? 'extension' : 'web');
if (!window.localStorage[LocalStorageKeys.ASKED_TO_IMPORT_CREATIONS]) {
this.fetchItems(false, true).then(items => {