Skip to content

Commit e22415b

Browse files
author
Ives van Hoorne
committed
Remove HEAP
1 parent 71b9af4 commit e22415b

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The JavaScript community has sharing as its selling point. It has the biggest op
88

99
CodeSandbox aims to solve this by allowing developers to simply go to a URL in their browser to start building. This not only makes it easier to get started, it also makes it easier to share. You can just share your created work by sharing the URL, others can then (without downloading) further develop on these sandboxes.
1010

11-
## ⚠️ Warning ⚠️
11+
## ⚠️ Disclaimer ⚠️
1212

1313
I built CodeSandbox as a fun project when I was bored during lectures, therefore the client code is a bit of a mess. I've done some refactoring after release, but we're not there yet. It's missing:
1414

@@ -19,7 +19,9 @@ I built CodeSandbox as a fun project when I was bored during lectures, therefore
1919
- Some reusability between components
2020
- Some more things
2121

22-
This means it's sometimes a bit hard to navigate through the code, but no worries! I'm here to help, just open an issue and I'll help you out + adjust the documentation.
22+
This means it's sometimes a bit hard to navigate through the code, but no worries! I'm here to help, just open an issue and I'll help you out and create some documentation.
23+
24+
Don't hesitate to help make this application beautiful!
2325

2426
## Organization
2527

@@ -31,7 +33,7 @@ The CodeSandbox client is currently divided in to 5 parts.
3133
- `common`: The common parts between `sandbox`, `embed` and `app`
3234
- `homepage`: Homepage!
3335

34-
This version of CodeSandbox is using the production server as source of truth, this is specified by the environment variable `LOCAL_SERVER`. It's not yet possible to sign in in this version, I haven't figured this out yet.
36+
This version of CodeSandbox is using the production server as source of truth, this is specified by the environment variable `LOCAL_SERVER`. It's not yet possible to sign in using this version, I haven't figured out how to handle this yet.
3537

3638
## Installation
3739

src/app/utils/analytics.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,8 @@ import type { CurrentUser } from 'common/types';
44

55
const debug = _debug('cs:analytics');
66

7-
const heapAvailable = () => typeof window.heap === 'object';
87
const sentryAvailable = () => typeof window.Raven === 'object';
98

10-
export default function track(event: string, data: Object) {
11-
if (!heapAvailable()) return;
12-
13-
debug(`Tracking event ${event} with data`, data);
14-
if (process.env.NODE_ENV === 'production') {
15-
window.heap.track(event, data);
16-
}
17-
}
18-
19-
function identifyHeap(user: CurrentUser) {
20-
if (!heapAvailable()) return;
21-
22-
if (process.env.NODE_ENV === 'production') {
23-
window.heap.identify(user.username);
24-
window.heap.addUserProperties({
25-
id: user.id,
26-
name: user.name,
27-
});
28-
}
29-
}
30-
319
function identifySentry(user: CurrentUser) {
3210
if (!sentryAvailable()) return;
3311

@@ -39,6 +17,5 @@ function identifySentry(user: CurrentUser) {
3917

4018
export function identify(user: CurrentUser) {
4119
debug(`Identified ${user.username}`);
42-
identifyHeap(user);
4320
identifySentry(user);
4421
}

0 commit comments

Comments
 (0)