OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
improve(buffer): exclude common properties before checking!
Carl-Gerhard Lindesvärd4b3a7222f87a
diff --git a/packages/db/src/buffers/profile-buffer-psql.ts b/packages/db/src/buffers/profile-buffer-psql.tsindex 32fe4c432..3580f6f1b 100644--- a/packages/db/src/buffers/profile-buffer-psql.ts+++ b/packages/db/src/buffers/profile-buffer-psql.ts@@ -79,10 +79,22 @@ export class ProfileBuffer extends BaseBuffer {private stringify(profile: IClickhouseProfile): string {const exclude = [['created_at'],+ ['properties', 'brand'],+ ['properties', 'browser_version'],+ ['properties', 'browser'],+ ['properties', 'city'],+ ['properties', 'country'],+ ['properties', 'device'],+ ['properties', 'latitude'],+ ['properties', 'longitude'],+ ['properties', 'model'],+ ['properties', 'os_version'],+ ['properties', 'os'],['properties', 'path'],- ['properties', 'referrer'],['properties', 'referrer_name'],['properties', 'referrer_type'],+ ['properties', 'referrer'],+ ['properties', 'region'],];const excluded = this.excludeKeys(profile, exclude);const sorted = this.sortObjectKeys(excluded);