File tree Expand file tree Collapse file tree 1 file changed +11
-31
lines changed Expand file tree Collapse file tree 1 file changed +11
-31
lines changed Original file line number Diff line number Diff line change @@ -12,39 +12,19 @@ Gleap.identify("user_19283", {
12
12
value : 199
13
13
} ) ;
14
14
15
- Gleap . attachCustomData ( {
16
- mission : "Unicorn" ,
17
- type : "Demo App" ,
18
- nestedData : {
19
- possible : true ,
20
- name : "Mission: Impossible - Ghost Protocol" ,
21
- } ,
22
- } ) ;
23
-
24
15
Gleap . log ( "Test log" ) ;
25
16
Gleap . log ( "Test log info" , "INFO" ) ;
26
17
Gleap . log ( "Test log warn" , "WARNING" ) ;
27
18
Gleap . log ( "Test log err" , "ERROR" ) ;
28
19
29
- // Register custom action.
30
- Gleap . registerCustomAction ( ( customAction ) => {
31
- console . log ( "Custom action called:" ) ;
32
- console . log ( customAction ) ;
33
- } ) ;
34
-
35
- // Network logs test.
36
- setTimeout ( ( ) => {
37
- console . log ( "Loading place infos" ) ;
38
-
39
- var xmlhttp = new XMLHttpRequest ( ) ;
40
- var url = "https://jsonplaceholder.typicode.com/todos/1" ;
41
-
42
- xmlhttp . onreadystatechange = function ( ) {
43
- if ( this . readyState == 4 && this . status == 200 ) {
44
- var myArr = JSON . parse ( this . responseText ) ;
45
- console . log ( myArr ) ;
46
- }
47
- } ;
48
- xmlhttp . open ( "GET" , url , true ) ;
49
- xmlhttp . send ( ) ;
50
- } , 3000 ) ;
20
+ Gleap . on ( "open" , ( ) => {
21
+ // Attach custom data.
22
+ Gleap . attachCustomData ( {
23
+ mission : "Unicorn" ,
24
+ type : "Demo App" ,
25
+ nestedData : {
26
+ possible : true ,
27
+ name : "Mission: Impossible - Ghost Protocol" ,
28
+ } ,
29
+ } ) ;
30
+ } ) ;
You can’t perform that action at this time.
0 commit comments