Photo by Justin Morgan on Unsplash

Initialisation Factory function

Plugging it in its own module

Tracking declared and realtime events

Tracking page view events injecting this Factory function

For events(operations) which relies on some API response arrival

For pushing error logs to Countly

export class CountlyErrorHandler implements ErrorHandler {
handleError(error: unknown) {
Countly.q.push(['log_error', error]);
console.error(error);
}
}

Final Countly Module

Consuming Countly module in the root module

--

--

Ankit kaushik

Ankit kaushik

I am a passionate Frontend web developer who is continuously working towards betterment of the front-end community.