diff --git a/libraries/nestjs-libraries/src/track/track.service.ts b/libraries/nestjs-libraries/src/track/track.service.ts index a4a31f9c5..691046c59 100644 --- a/libraries/nestjs-libraries/src/track/track.service.ts +++ b/libraries/nestjs-libraries/src/track/track.service.ts @@ -38,8 +38,8 @@ export class TrackService { const current_timestamp = Math.floor(new Date() / 1000); const userData = new UserData(); - userData.setClientIpAddress(user?.ip || ip); - userData.setClientUserAgent(user?.agent || agent); + userData.setClientIpAddress(ip || user?.ip || ''); + userData.setClientUserAgent(agent || user?.agent || ''); if (fbclid) { userData.setFbc(fbclid); }