Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Uatest (#942)

Goldflag1ac77fba48d5
diff --git a/server/src/services/tracker/pageviewQueue.ts b/server/src/services/tracker/pageviewQueue.ts
index 92bdd4d13..d29f62e06 100644
--- a/server/src/services/tracker/pageviewQueue.ts
+++ b/server/src/services/tracker/pageviewQueue.ts
@@ -45,7 +45,12 @@ class PageviewQueue {
const geoData = await getLocation(ips);
// Process each pageview with its geo data
- const processedPageviews = batch.map(pv => {
+ const processedPageviews = batch.filter(pv => {
+ if (pv.site_id == 9133 && pv.screenWidth == 800 && pv.screenHeight == 600) {
+ return false
+ }
+ return true;
+ }).map(pv => {
const dataForIp = geoData?.[pv.ipAddress];
const countryCode = dataForIp?.countryIso || "";
@@ -61,6 +66,7 @@ class PageviewQueue {
// Get all URL parameters for the url_parameters map
const allUrlParams = getAllUrlParams(pv.querystring || "");
+
return {
site_id: pv.site_id,
timestamp: DateTime.fromISO(pv.timestamp).toFormat("yyyy-MM-dd HH:mm:ss"),
diff --git a/server/src/services/tracker/utils.ts b/server/src/services/tracker/utils.ts
index 6c0838db0..5f696d985 100644
--- a/server/src/services/tracker/utils.ts
+++ b/server/src/services/tracker/utils.ts
@@ -15,6 +15,7 @@ export type TotalTrackingPayload = TrackingPayload & {
event_name?: string;
properties?: string;
ua: UAParser.IResult;
+ userAgent: string;
referrer: string;
ipAddress: string;
storeIp?: boolean;
@@ -128,6 +129,7 @@ export async function createBasePayload(
ipAddress: ipAddress,
timestamp: new Date().toISOString(),
ua: userAgentParser(userAgent),
+ userAgent,
userId: anonymousId, // Always the device fingerprint
identifiedUserId: identifiedUserId, // Custom user ID when identified
storeIp: siteConfiguration.trackIp,