diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-11-21 01:23:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 01:23:34 +0800 |
commit | ba41fc9275bebe17577f87d72f54b7e7dc420acc (patch) | |
tree | 54b788a7cbf76c8c3781dbcb1fb11d8b21156b13 /packages/instant/src/components | |
parent | 36e888c3a50ea9a639a8935690ea7dd67dedf166 (diff) | |
parent | 497385818b42f298c777ce3fbeb3e2d55a2bdc64 (diff) | |
download | dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.tar dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.tar.gz dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.tar.bz2 dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.tar.lz dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.tar.xz dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.tar.zst dexon-sol-tools-ba41fc9275bebe17577f87d72f54b7e7dc420acc.zip |
Merge pull request #1272 from 0xProject/feature/instant/heap
[instant] Base heap integration
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/zero_ex_instant_provider.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 8be53ee20..9435d8c7c 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -12,6 +12,7 @@ import { DEFAULT_STATE, DefaultState, State } from '../redux/reducer'; import { store, Store } from '../redux/store'; import { fonts } from '../style/fonts'; import { AccountState, AffiliateInfo, AssetMetaData, Network, OrderSource } from '../types'; +import { analytics, disableAnalytics } from '../util/analytics'; import { assetUtils } from '../util/asset'; import { errorFlasher } from '../util/error_flasher'; import { gasPriceEstimator } from '../util/gas_price_estimator'; @@ -36,6 +37,7 @@ export interface ZeroExInstantProviderOptionalProps { additionalAssetMetaDataMap: ObjectMap<AssetMetaData>; networkId: Network; affiliateInfo: AffiliateInfo; + shouldDisableAnalyticsTracking: boolean; } export class ZeroExInstantProvider extends React.Component<ZeroExInstantProviderProps> { @@ -121,6 +123,18 @@ export class ZeroExInstantProvider extends React.Component<ZeroExInstantProvider gasPriceEstimator.getGasInfoAsync(); // tslint:disable-next-line:no-floating-promises this._flashErrorIfWrongNetwork(); + + // Analytics + disableAnalytics(this.props.shouldDisableAnalyticsTracking || false); + analytics.addEventProperties({ + embeddedHost: window.location.host, + embeddedUrl: window.location.href, + networkId: state.network, + providerName: state.providerState.name, + gitSha: process.env.GIT_SHA, + npmVersion: process.env.NPM_PACKAGE_VERSION, + }); + analytics.trackInstantOpened(); } public componentWillUnmount(): void { if (this._accountUpdateHeartbeat) { |