crowne
Analytics
UMD
<script src="https://crowne.io/v1/web.js"></script>
<script defer>
var Crowne = crowne('your-api-key', {
});
</script>
ESM
import { crowne } from 'crowne/analytics';
let Crowne = crowne('your-api-key', {
});
Events
import * as crowne from 'crowne/events';
await crowne.report('your-api-key', {
type: 'ping',
timestamp: Date.now(),
});
await crowne.beacon('your-api-key', [
{ type: 'ping', pong: false },
{ type: 'hello', name: 'world' },
]);
let client = crowne.batch('your-api-key', crowne.beacon, {
limit: 50,
interval: 10e3
});
client.push(
{ type: 'ping' },
{ type: 'pong' },
);
client.push({
type: 'hello',
name: 'world',
});
client.size();
client.report();
client.end();