Skip to content

Commit

Permalink
chore: Remove PII info for external apps (#1180)
Browse files Browse the repository at this point in the history
* chore: Remove PII info for external apps

* fux

* fix

* fix test

* fix test
  • Loading branch information
ashwin1111 authored Feb 10, 2025
1 parent f47a2dc commit 11b32b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/app/core/services/integration/refiner.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
org_id: this.user.org_id
},
source: 'Fyle Integration Settings',
action_name: actionName,
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/integration/tracking.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('TrackingService', () => {
});

it('should track Open Landing Page event', () => {
expect(service.onOpenLandingPage('[email protected]', 1, 'Lolo Org', 'or767asdih5')).toBeUndefined();
expect(service.onOpenLandingPage('[email protected]', 'or767asdih5')).toBeUndefined();
});

it('should flatten the payload', () => {
Expand Down
8 changes: 3 additions & 5 deletions src/app/core/services/integration/tracking.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,14 @@ export class TrackingService {
}
}

onOpenLandingPage(email: string | undefined, orgId: number, orgName: string, fyleOrgId: string): void {
onOpenLandingPage(userId: string | undefined, 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);
Expand Down
2 changes: 1 addition & 1 deletion src/app/integrations/integrations.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.fyle_org_id);
this.org = org;
this.storageService.set('orgId', this.org.id);
this.storageService.set('org', this.org);
Expand Down

0 comments on commit 11b32b9

Please sign in to comment.