Report on git sha and npm version of build

This commit is contained in:
Steve Klebanoff
2018-11-16 10:19:16 -08:00
parent 85a99203d0
commit 42565869a4
3 changed files with 8 additions and 3 deletions

View File

@@ -128,6 +128,8 @@ export class ZeroExInstantProvider extends React.Component<ZeroExInstantProvider
embeddedUrl: window.location.href,
networkId: state.network,
providerName: state.providerState.name,
gitSha: process.env.GIT_SHA,
npmVersion: process.env.NPM_PACKAGE_VERSION,
});
analytics.widgetOpened();
}

View File

@@ -30,8 +30,10 @@ export interface AnalyticsUserOptions {
export interface AnalyticsEventOptions {
embeddedHost?: string;
embeddedUrl?: string;
networkId: number;
providerName: string;
networkId?: number;
providerName?: string;
gitSha?: string;
npmVersion?: string;
}
export const analytics = {
addUserProperties: (properties: AnalyticsUserOptions): void => {

View File

@@ -23,7 +23,8 @@ module.exports = {
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
GIT_SHA: JSON.stringify(GIT_SHA),
ENABLE_HEAP: process.env.ENABLE_HEAP,
ENABLE_HEAP: JSON.stringify(process.env.ENABLE_HEAP),
NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version),
},
}),
],