Uh oh!
There was an error while loading. Please reload this page.
forked from segmentio/analytics-node
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
Latest commit
66 lines (64 loc) · 1.86 KB
/
Copy pathexample.js
File metadata and controls
66 lines (64 loc) · 1.86 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
constos=require('os')
constuuid=require('uuid')
constAnalytics=require('.')
constclient=newAnalytics('eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOjMxOH0.5LpPhS_XI2Q3bg4bg_ZM1Flq4UJvkn0495P4EsPZ-qA',{
'host': 'https://event.filum.gq'
})
for(leti=0;i<10;i++){
anonymous_id=uuid.v4();
client.track({
anonymous_id: anonymous_id,
event_name: 'Filum Testing Event Sent',
event_params: {
'name': 'Harry Potter',
'address': 'London, England',
'age': i+11,
'weight': 35.5,
'true': true,
'false': false,
'null_key': null,
'object': {
"a": 1,
"b": "abadsfasf",
"boolean": false,
"true": true,
"float": 33.3,
"null_sub": null
},
"list": [
{
"a": 1,
"b": "abadsfasf",
"boolean": false,
"true": true,
"float": 33.3,
"null_sub": null
},
{
"a": 1,
"b": "abadsfasf",
"boolean": false,
"true": true,
"float": 33.3,
"null_sub": null
}
],
"empty_dict": {},
"empty_list": []
},
origin: 'Example App'
});
client.identify({
anonymous_id: anonymous_id,
event_params: {
"username": "theboywholived_2021",
"name": "Harry Potter",
"age": i+11,
"weight": 35.5,
"email": "the_boy_who_lived@gmail.com",
"phone": "+123 456 6789"
},
origin: "Example App"
});
}
client.flush()