forked from john-doherty/mixpanel-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (28 loc) · 999 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<!-- <script src="dist/mixpanel-lite.min.js"></script> -->
<script src="src/mixpanel-lite.js"></script>
<script>
// project token from mixpanel.com
var token = '7da2a3262010d35f443a498253dba2d3';
window.onload = function() {
// setup mixpanel
mixpanel.init(token);
// assign all future events to a user
mixpanel.identify('[email protected]');
// assign user info
mixpanel.people.set({
$email: '[email protected]' // only special properties need the $
});
// track an event
mixpanel.track('Your Event Name', {
firstName: 'Optional event property 1',
lastName: 'Optional event property 2'
});
}
</script>
</head>
<body>
</body>
</html>