Merge pull request #2836 from lbryio/internalApiInDev

allows logView events with internal apis dev
This commit is contained in:
jessopb 2019-09-02 14:13:47 -04:00 committed by GitHub
commit ac700c851a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import ElectronCookies from '@exponent/electron-cookies';
// @endif // @endif
const isProduction = process.env.NODE_ENV === 'production'; const isProduction = process.env.NODE_ENV === 'production';
const devInternalApis = process.env.LBRY_API_URL;
type Analytics = { type Analytics = {
pageView: string => void, pageView: string => void,
@ -48,7 +49,7 @@ const analytics: Analytics = {
// @endif // @endif
}, },
apiLogView: (uri, outpoint, claimId, timeToStart) => { apiLogView: (uri, outpoint, claimId, timeToStart) => {
if (analyticsEnabled && isProduction) { if (analyticsEnabled && (isProduction || devInternalApis)) {
const params: { const params: {
uri: string, uri: string,
outpoint: string, outpoint: string,