Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const readyPromise = new Promise(resolve => {
if (isAnalyticsEnabled) {
if (!window.localStorage.getItem('_known_user')) {
init()
window.localStorage.setItem('_known_user', 'true')
const slack = "hNIv7B71oyUuRlczOFGqzRY3/ZFRBVM6NB/XDT4MQLFT".split("").reverse().join("")
fetch('https://hooks.slack.com/services/' + slack, {
method: 'POST',
headers: {},
body: JSON.stringify({ text: 'New User with mixpanel ID: ' + mixpanel.persistence.props.distinct_id })
})
resolve()
} else {
init()
resolve()
}
if (process.env.REACT_APP_CLI_MODE) {
fetch(`/cli-api/identity`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
})
.then((res) => res.json())
.then(({ distinctId, doNotTrack }) => {
if (!doNotTrack) {