Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added public to public methods

Blue Mouse29d66721dda8
diff --git a/src/index.ts b/src/index.ts
index 41473de7f..4195121b0 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -146,7 +146,7 @@ export class Swetrix {
* @param event TrackEventOptions
* @returns void
*/
- track(ip: string, userAgent: string, event: TrackEventOptions): void {
+ public track(ip: string, userAgent: string, event: TrackEventOptions): void {
if (!this.canTrack()) {
return
}
@@ -166,7 +166,7 @@ export class Swetrix {
* @param pageview TrackPageViewOptions
* @returns void
*/
- trackPageView(ip: string, userAgent: string, pageview?: TrackPageViewOptions) {
+ public trackPageView(ip: string, userAgent: string, pageview?: TrackPageViewOptions) {
if (!this.canTrack()) {
return
}
@@ -196,7 +196,7 @@ export class Swetrix {
* @param userAgent User agent of the visitor
* @returns void
*/
- heartbeat(ip: string, userAgent: string): void {
+ public heartbeat(ip: string, userAgent: string): void {
if (!this.canTrack()) {
return
}