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!

Update events metadata type

Blue Mouse018e87d7ceed
diff --git a/dist/esnext/Lib.d.ts b/dist/esnext/Lib.d.ts
index e754e8856..e7aab6132 100644
--- a/dist/esnext/Lib.d.ts
+++ b/dist/esnext/Lib.d.ts
@@ -22,7 +22,7 @@ export interface TrackEventOptions {
unique?: boolean;
/** Event-related metadata object with string values. */
meta?: {
- [key: string]: string;
+ [key: string]: string | number | boolean | null | undefined;
};
}
export interface IPageViewPayload {
@@ -37,7 +37,7 @@ export interface IPageViewPayload {
pg?: string | null;
/** Pageview-related metadata object with string values. */
meta?: {
- [key: string]: string;
+ [key: string]: string | number | boolean | null | undefined;
};
}
export interface IErrorEventPayload {
@@ -48,7 +48,7 @@ export interface IErrorEventPayload {
filename?: string | null;
stackTrace?: string | null;
meta?: {
- [key: string]: string;
+ [key: string]: string | number | boolean | null | undefined;
};
}
export interface IInternalErrorEventPayload extends IErrorEventPayload {
diff --git a/package.json b/package.json
index 469021d0a..24c436e73 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "swetrix",
- "version": "3.7.0",
+ "version": "3.7.1",
"description": "The JavaScript analytics client for Swetrix Analytics",
"type": "module",
"main": "dist/swetrix.cjs.js",
diff --git a/src/Lib.ts b/src/Lib.ts
index b6c06c5b6..48cd2e210 100644
--- a/src/Lib.ts
+++ b/src/Lib.ts
@@ -43,7 +43,7 @@ export interface TrackEventOptions {
/** Event-related metadata object with string values. */
meta?: {
- [key: string]: string
+ [key: string]: string | number | boolean | null | undefined
}
}
@@ -61,7 +61,7 @@ export interface IPageViewPayload {
/** Pageview-related metadata object with string values. */
meta?: {
- [key: string]: string
+ [key: string]: string | number | boolean | null | undefined
}
}
@@ -74,7 +74,7 @@ export interface IErrorEventPayload {
filename?: string | null
stackTrace?: string | null
meta?: {
- [key: string]: string
+ [key: string]: string | number | boolean | null | undefined
}
}