Skip to content

Commit

Permalink
feat: add organization to event props
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lakhdar committed Sep 21, 2023
1 parent c2a59ff commit 5c436ef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 0 additions & 6 deletions packages/cli/commons/src/analytics/identifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,13 @@ export class Identifier {
user_id: userId,
device_id: deviceId,
...this.getAmplitudeBaseEventProperties(),
...this.getOrganizationIdentifier(),
};
amplitudeIdentify(identifier, identifyEvent);
};

return {userId, deviceId, identify};
}

private getOrganizationIdentifier() {
const {environment, region, organization} = this.configuration;
return {environment, region, organization};
}

private hash(word: string) {
const hash = createHash('sha256').update(word);
return hash.digest('hex').toString();
Expand Down
1 change: 1 addition & 0 deletions packages/cli/core/src/hooks/analytics/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const augmentEvent = async (
event.event_properties = {
...event.event_properties,
organization_type: type,
organization,
environment,
region,
};
Expand Down

0 comments on commit 5c436ef

Please sign in to comment.