Skip to content

Commit

Permalink
not erroring but event not showing up in panel???
Browse files Browse the repository at this point in the history
  • Loading branch information
etweisberg committed Apr 11, 2024
1 parent aa7110b commit 2198543
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ module.exports = {
// Add overriden rules here
'no-console': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'import/no-extraneous-dependencies': 2,
'prettier/prettier': ['error', { endOfLine: 'auto' }],
},
};
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"@reduxjs/toolkit": "^1.8.1",
"@sendgrid/mail": "^7.7.0",
"@types/mixpanel-browser": "^2.49.0",
"bcrypt": "^5.0.1",
"connect-mongo": "^4.6.0",
"cookie-parser": "^1.4.6",
Expand Down
4 changes: 3 additions & 1 deletion server/src/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import {
} from '../services/invite.service.ts';
import { IInvite } from '../models/invite.model.ts';

mixpanel.init(process.env.MIXPANEL_TOKEN);
const mixpanelToken = process.env.MIXPANEL_TOKEN || 'DEFAULT_TOKEN';
mixpanel.init(mixpanelToken);

/**
* A controller function to login a user and create a session with Passport.
Expand Down Expand Up @@ -68,6 +69,7 @@ const login = async (
next(ApiError.internal('Failed to log in user'));
return;
}
console.log('Mixpanel tracking login');
mixpanel.track('User Logged In', {
distinct_id: user._id,
email: user.email,
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2553,6 +2553,11 @@
resolved "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz"
integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==

"@types/mixpanel-browser@^2.49.0":
version "2.49.0"
resolved "https://registry.yarnpkg.com/@types/mixpanel-browser/-/mixpanel-browser-2.49.0.tgz#ad92ecc36fad63b9c0aed80b6283d86dbf52e49e"
integrity sha512-StmgUnS58d44DmIAEX9Kk8qwisAYCl6E2qulIjYyHXUPuJCPOuyUMTTKBp+aU2F2do+kxAzCxiBtsB4fnBT9Fg==

"@types/node@*", "@types/node@^18.8.3":
version "18.8.3"
resolved "https://registry.npmjs.org/@types/node/-/node-18.8.3.tgz"
Expand Down

0 comments on commit 2198543

Please sign in to comment.