aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/instant/src/components/zero_ex_instant_provider.tsx2
-rw-r--r--packages/instant/src/util/analytics.ts6
-rw-r--r--packages/instant/webpack.config.js3
3 files changed, 8 insertions, 3 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx
index 8bcdc214e..e85efb422 100644
--- a/packages/instant/src/components/zero_ex_instant_provider.tsx
+++ b/packages/instant/src/components/zero_ex_instant_provider.tsx
@@ -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();
}
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts
index ab8a86f04..e7a67bee5 100644
--- a/packages/instant/src/util/analytics.ts
+++ b/packages/instant/src/util/analytics.ts
@@ -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 => {
diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js
index 129092d70..43c149b3e 100644
--- a/packages/instant/webpack.config.js
+++ b/packages/instant/webpack.config.js
@@ -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),
},
}),
],