Skip to content

Commit 1186aa8

Browse files
committed
Allow any value for the identify function
1 parent c6f5054 commit 1186aa8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/app/src/app/overmind/effects/jwt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
document.cookie = `signedIn=; Path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
1717
document.cookie = `jwt=; Path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
1818

19-
identify('signed_in', 'false');
19+
identify('signed_in', false);
2020
resetUserId();
2121

2222
return store.set('jwt', null);

packages/app/src/app/overmind/internalActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const setPatronPrice: Action = ({ state }) => {
6464

6565
export const setSignedInCookie: Action = ({ state }) => {
6666
document.cookie = 'signedIn=true; Path=/;';
67-
identify('signed_in', 'true');
67+
identify('signed_in', true);
6868
setUserId(state.user.id);
6969
};
7070

packages/app/src/embed/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import track, { identify } from '@codesandbox/common/lib/utils/analytics';
1414
import App from './components/App';
1515

1616
try {
17-
identify('signed_in', Boolean(localStorage.jwt).toString());
17+
identify('signed_in', Boolean(localStorage.jwt));
1818
} catch (e) {
1919
/* ignore error */
2020
}

packages/common/src/utils/analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export async function logError(err: Error) {
130130
if (window.console && console.error) console.error(err);
131131
}
132132

133-
export async function identify(key: string, value: string) {
133+
export async function identify(key: string, value: any) {
134134
try {
135135
if (!DNT) {
136136
if (typeof global.amplitude !== 'undefined') {

0 commit comments

Comments
 (0)