flushed

Await the transmission of pending events.

This property returns a Promise that resolves when all pending events are successfully transmitted.

Signature

This property has the following signature:

public get flushed(): Promise<void>

Example

Here is a basic example of how to use this property:

croct.track('goalCompleted', {goalId: 'newsletter-sign-up'});
croct.flushed.then(() => {
console.log('Events flushed');
});