|
74 | 74 | }; |
75 | 75 | </script> |
76 | 76 | <script> |
77 | | - amplitude.getInstance('app1').init('a2dbce0e18dfe5f8e74493843ff5c053', null, {includeReferrer: true}, function() { |
78 | | - alert(amplitude.getInstance('app1').options.deviceId); |
| 77 | + amplitude.init('a2dbce0e18dfe5f8e74493843ff5c053', null, {includeReferrer: true}, function() { |
| 78 | + alert(amplitude.options.deviceId); |
79 | 79 | }); |
80 | | - amplitude.getInstance('app1').setVersionName('Web'); |
81 | | - amplitude.getInstance('app1').identify(new amplitude.Identify().add('photoCount', 1)); |
82 | | - amplitude.getInstance('app1').identify(new amplitude.Identify().add('photoCount', 1).set('gender', 'male').unset('karma')); |
83 | | - amplitude.getInstance('app1').logEvent('pageLoad'); |
| 80 | + amplitude.setVersionName('Web'); |
| 81 | + amplitude.identify(new amplitude.Identify().add('photoCount', 1)); |
| 82 | + amplitude.identify(new amplitude.Identify().add('photoCount', 1).set('gender', 'male').unset('karma')); |
| 83 | + amplitude.logEvent('pageLoad'); |
84 | 84 |
|
85 | 85 | amplitude.getInstance('app2').logEvent('log event before init'); |
86 | | - amplitude.getInstance('app2').init('5a7d9276272cd8d8af9992e41dbdeb95', 'checkers@gmail.com', {includeReferrer: true}, function() { |
| 86 | + amplitude.getInstance('app2').init('1d2fe1e104eb3f07a24e94d359f70fd5', 'checkers@gmail.com', {includeReferrer: true}, function() { |
87 | 87 | alert(amplitude.getInstance('app2').options.deviceId); |
88 | 88 | }); |
89 | 89 | amplitude.getInstance('app2').identify(new amplitude.Identify().set('key', 'value')); |
90 | 90 | amplitude.getInstance('app2').logEvent('app 2 page load'); |
| 91 | + |
| 92 | + amplitude.getInstance('app3').init('a2dbce0e18dfe5f8e74493843ff5c053', null, {batchEvents: true, eventUploadThreshold: 2}); |
| 93 | + amplitude.getInstance('app3').logEvent('app3 pageLoad'); |
| 94 | + |
| 95 | + amplitude.getInstance('app4').init('1d2fe1e104eb3f07a24e94d359f70fd5', 'joe@gmail.com'); |
| 96 | + amplitude.getInstance('app4').logEvent('app 4 page load'); |
| 97 | + |
91 | 98 | </script> |
92 | 99 | <body> |
93 | 100 | <h3>Amplitude JS Test</h3> |
|
0 commit comments