From 08117a6870a7f2856f7e3e2b9dc0766941f560ca Mon Sep 17 00:00:00 2001 From: ashwin1111 Date: Mon, 10 Feb 2025 16:57:49 +0530 Subject: [PATCH] chore: Remove PII info for external apps --- src/app/core/services/integration/refiner.service.ts | 4 +--- src/app/core/services/integration/tracking.service.ts | 7 +++---- src/app/integrations/integrations.component.ts | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/core/services/integration/refiner.service.ts b/src/app/core/services/integration/refiner.service.ts index c79e198dd..5baaf11ea 100644 --- a/src/app/core/services/integration/refiner.service.ts +++ b/src/app/core/services/integration/refiner.service.ts @@ -22,10 +22,8 @@ export class RefinerService { if (this.refiner) { this.refiner('identifyUser', { id: this.user.org_id, - email: this.user.email, - name: this.user.full_name, account: { - workspace_name: this.user.org_name + workspace_id: this.user.org_id }, source: 'Fyle Integration Settings', action_name: actionName, diff --git a/src/app/core/services/integration/tracking.service.ts b/src/app/core/services/integration/tracking.service.ts index eabed6381..ecd69043f 100644 --- a/src/app/core/services/integration/tracking.service.ts +++ b/src/app/core/services/integration/tracking.service.ts @@ -73,16 +73,15 @@ export class TrackingService { } } - onOpenLandingPage(email: string | undefined, orgId: number, orgName: string, fyleOrgId: string): void { + onOpenLandingPage(userId: string | undefined, orgId: number, fyleOrgId: string): void { try { if (this.tracking) { - this.tracking.identify(email); + this.tracking.identify(userId); this.tracking.people.set({ orgId, - orgName, fyleOrgId }); - this.identityEmail = email; + this.identityEmail = userId; } } catch (e) { console.error('Tracking error:', e); diff --git a/src/app/integrations/integrations.component.ts b/src/app/integrations/integrations.component.ts index beb485f8e..bec8fedca 100644 --- a/src/app/integrations/integrations.component.ts +++ b/src/app/integrations/integrations.component.ts @@ -63,7 +63,7 @@ export class IntegrationsComponent implements OnInit { this.user = this.userService.getUserProfile(); this.getOrCreateOrg().then((org: Org | undefined) => { if (org) { - this.trackingService.onOpenLandingPage(this.user?.email, org.id, org.name, org.fyle_org_id); + this.trackingService.onOpenLandingPage(this.user?.user_id, org.id, org.name); this.org = org; this.storageService.set('orgId', this.org.id); this.storageService.set('org', this.org);