Skip to content

Commit c6f5054

Browse files
committed
Track the signed in state in embed
1 parent 5ca4139 commit c6f5054

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/app/src/embed/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ import theme from '@codesandbox/common/lib/theme';
99
import '@codesandbox/common/lib/global.css';
1010

1111
import codesandbox from '@codesandbox/common/lib/themes/codesandbox.json';
12-
import track from '@codesandbox/common/lib/utils/analytics';
12+
import track, { identify } from '@codesandbox/common/lib/utils/analytics';
1313

1414
import App from './components/App';
1515

16+
try {
17+
identify('signed_in', Boolean(localStorage.jwt).toString());
18+
} catch (e) {
19+
/* ignore error */
20+
}
1621
document.addEventListener('click', () => {
1722
track('Embed Interaction');
1823
});

0 commit comments

Comments
 (0)