diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-17 08:44:23 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-17 08:44:23 +0800 |
commit | 3f0d94c83872ae80d6377fd4f712efa4c174a284 (patch) | |
tree | 87757d2a96c2a4f295de0be2256afe8f6fc76842 /packages/instant/src/components | |
parent | 097bfe581dff6ff77e3cf19a03138743ae13868e (diff) | |
download | dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.tar dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.tar.gz dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.tar.bz2 dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.tar.lz dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.tar.xz dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.tar.zst dexon-sol-tools-3f0d94c83872ae80d6377fd4f712efa4c174a284.zip |
Add way to disable via props
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/zero_ex_instant_provider.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 1d5e7fe6f..52454148f 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -12,7 +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 } from '../util/analytics'; +import { analytics, disableAnalytics } from '../util/analytics'; import { assetUtils } from '../util/asset'; import { errorFlasher } from '../util/error_flasher'; import { gasPriceEstimator } from '../util/gas_price_estimator'; @@ -37,6 +37,7 @@ export interface ZeroExInstantProviderOptionalProps { additionalAssetMetaDataMap: ObjectMap<AssetMetaData>; networkId: Network; affiliateInfo: AffiliateInfo; + disableAnalyticsTracking: boolean; } export class ZeroExInstantProvider extends React.Component<ZeroExInstantProviderProps> { @@ -124,6 +125,9 @@ export class ZeroExInstantProvider extends React.Component<ZeroExInstantProvider this._flashErrorIfWrongNetwork(); // Analytics + if (this.props.disableAnalyticsTracking) { + disableAnalytics(); + } analytics.addEventProperties({ embeddedHost: window.location.host, embeddedUrl: window.location.href, |