File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
packages/cli/src/cli/utils Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 11import pkg from "node-machine-id" ;
22const { machineIdSync } = pkg ;
33import https from "https" ;
4- import crypto from "crypto" ;
54import { getOrgId } from "./org-id" ;
65
76const POSTHOG_API_KEY = "phc_eR0iSoQufBxNY36k0f0T15UvHJdTfHlh8rJcxsfhfXk" ;
@@ -18,9 +17,8 @@ function determineDistinctId(email: string | null | undefined): {
1817 const orgId = getOrgId ( ) ;
1918
2019 if ( email ) {
21- const hashedEmail = crypto . createHash ( "sha256" ) . update ( email ) . digest ( "hex" ) ;
2220 return {
23- distinct_id : hashedEmail ,
21+ distinct_id : email ,
2422 distinct_id_source : "email" ,
2523 org_id : orgId ,
2624 } ;
@@ -72,6 +70,7 @@ export default function trackEvent(
7270 distinct_id : identityInfo . distinct_id ,
7371 properties : {
7472 ...properties ,
73+ ...( email ? { $set : { email } } : { } ) ,
7574 $lib : "lingo.dev-cli" ,
7675 $lib_version : process . env . npm_package_version || "unknown" ,
7776 tracking_version : TRACKING_VERSION ,
You can’t perform that action at this time.
0 commit comments