diff --git a/custom/homepage.example.js b/custom/homepage.example.js
index d81c90866..0f8db1a5a 100644
--- a/custom/homepage.example.js
+++ b/custom/homepage.example.js
@@ -71,7 +71,7 @@ type RowDataItem = {
};
export default function getHomePageRowData(
- authenticated: boolean,
+ authenticated,
showPersonalizedChannels: boolean,
showPersonalizedTags: boolean,
subscribedChannels: Array,
diff --git a/package.json b/package.json
index 80ccf3d6e..3ec7a7f96 100644
--- a/package.json
+++ b/package.json
@@ -135,7 +135,7 @@
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#b2d49c275538164ea6a8eee8eaf913c09b2a4992",
- "lbryinc": "lbryio/lbryinc#c21bc3075ca3f8bb130893107c11215eb7d5f4d5",
+ "lbryinc": "lbryio/lbryinc#39510e8b21d3fb56e903569224453bb8e122c23f",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",
"lodash-es": "^4.17.14",
@@ -159,7 +159,6 @@
"react-confetti": "^4.0.1",
"react-dom": "^16.8.2",
"react-draggable": "^3.3.0",
- "react-ga": "^2.5.7",
"react-google-recaptcha": "^2.0.1",
"react-hot-loader": "^4.11.1",
"react-modal": "^3.1.7",
diff --git a/static/app-strings.json b/static/app-strings.json
index 8b7f40b52..51e01245d 100644
--- a/static/app-strings.json
+++ b/static/app-strings.json
@@ -1197,5 +1197,9 @@
"lbry.tv Premium - 1 month": "lbry.tv Premium - 1 month",
"We will refund no questions asked within 30 days.": "We will refund no questions asked within 30 days.",
"Your Wallet": "Your Wallet",
- "This file may have been streamed, moved or deleted": "This file may have been streamed, moved or deleted"
+ "This file may have been streamed, moved or deleted": "This file may have been streamed, moved or deleted",
+ "LBRY takes privacy and choice seriously. Just a few questions before you enter the land of content freedom. ": "LBRY takes privacy and choice seriously. Just a few questions before you enter the land of content freedom. ",
+ "Sending information to third parties (e.g. Google Analytics or Mixpanel) allows us to use detailed\n analytical reports to improve all aspects of LBRY.": "Sending information to third parties (e.g. Google Analytics or Mixpanel) allows us to use detailed\n analytical reports to improve all aspects of LBRY.",
+ "Sharing information with LBRY, Inc. allows us to report to publishers how their content is doing, as\n well as track basic usage and performance. This is the minimum required to earn rewards from LBRY, Inc.": "Sharing information with LBRY, Inc. allows us to report to publishers how their content is doing, as\n well as track basic usage and performance. This is the minimum required to earn rewards from LBRY, Inc.",
+ "No information will be sent directly to LBRY, Inc. or third-parties about your usage. Note that as\n peer-to-peer software, your IP address and potentially other system information can be sent to other\n users, though this information is not stored permanently.": "No information will be sent directly to LBRY, Inc. or third-parties about your usage. Note that as\n peer-to-peer software, your IP address and potentially other system information can be sent to other\n users, though this information is not stored permanently."
}
diff --git a/ui/analytics.js b/ui/analytics.js
index 71cfbeedb..c5f0d967a 100644
--- a/ui/analytics.js
+++ b/ui/analytics.js
@@ -1,6 +1,5 @@
// @flow
import { Lbryio } from 'lbryinc';
-import ReactGA from 'react-ga';
import * as Sentry from '@sentry/browser';
import MatomoTracker from '@datapunt/matomo-tracker-js';
import { history } from './store';
@@ -14,10 +13,6 @@ import { MATOMO_ID, MATOMO_URL } from 'config';
const isProduction = process.env.NODE_ENV === 'production';
const devInternalApis = process.env.LBRY_API_URL;
-const LBRY_TV_MINUS_PIRATE_BAY_UA_ID = 'UA-60403362-16';
-const LBRY_TV_UA_ID = 'UA-60403362-12';
-const DESKTOP_UA_ID = 'UA-60403362-13';
-const SECOND_TRACKER_NAME = 'tracker2';
export const SHARE_INTERNAL = 'shareInternal';
const SHARE_THIRD_PARTY = 'shareThirdParty';
@@ -36,7 +31,6 @@ type Analytics = {
pageView: string => void,
setUser: Object => void,
toggleInternal: (boolean, ?boolean) => void,
- toggleThirdParty: (boolean, ?boolean) => void,
apiLogView: (string, string, string, ?number, ?() => void) => Promise,
apiLogPublish: (ChannelClaim | StreamClaim) => void,
apiSyncTags: ({}) => void,
@@ -60,10 +54,10 @@ type LogPublishParams = {
};
let internalAnalyticsEnabled: boolean = IS_WEB || false;
-let thirdPartyAnalyticsEnabled: boolean = IS_WEB || false;
+// let thirdPartyAnalyticsEnabled: boolean = IS_WEB || false;
// @if TARGET='app'
if (window.localStorage.getItem(SHARE_INTERNAL) === 'true') internalAnalyticsEnabled = true;
-if (window.localStorage.getItem(SHARE_THIRD_PARTY) === 'true') thirdPartyAnalyticsEnabled = true;
+// if (window.localStorage.getItem(SHARE_THIRD_PARTY) === 'true') thirdPartyAnalyticsEnabled = true;
// @endif
const analytics: Analytics = {
@@ -92,9 +86,6 @@ const analytics: Analytics = {
});
},
pageView: path => {
- if (thirdPartyAnalyticsEnabled) {
- ReactGA.pageview(path, [SECOND_TRACKER_NAME]);
- }
if (internalAnalyticsEnabled) {
MatomoInstance.trackPageView({
href: `${path}`,
@@ -102,14 +93,11 @@ const analytics: Analytics = {
}
},
setUser: userId => {
- if (thirdPartyAnalyticsEnabled && userId) {
- ReactGA.set({
- userId,
- });
-
+ // SEND USERID TO MATOMO?
+ if (internalAnalyticsEnabled && userId) {
// @if TARGET='app'
Native.getAppVersionInfo().then(({ localVersion }) => {
- sendGaEvent('Desktop-Version', localVersion);
+ sendMatomoEvent('Version', 'Desktop-Version', localVersion);
});
// @endif
}
@@ -125,7 +113,7 @@ const analytics: Analytics = {
toggleThirdParty: (enabled: boolean): void => {
// Always collect analytics on lbry.tv
// @if TARGET='app'
- thirdPartyAnalyticsEnabled = enabled;
+ // thirdPartyAnalyticsEnabled = enabled;
window.localStorage.setItem(SHARE_THIRD_PARTY, enabled);
// @endif
},
@@ -190,71 +178,45 @@ const analytics: Analytics = {
}
},
videoStartEvent: (claimId, duration) => {
- sendGaTimingEvent('Media', 'TimeToStart', duration, claimId);
sendPromMetric('time_to_start', duration);
sendMatomoEvent('Media', 'TimeToStart', claimId, duration);
},
videoBufferEvent: (claimId, currentTime) => {
- sendGaTimingEvent('Media', 'BufferTimestamp', currentTime * 1000, claimId);
sendPromMetric('buffer');
sendMatomoEvent('Media', 'BufferTimestamp', claimId, currentTime * 1000);
},
tagFollowEvent: (tag, following) => {
- sendGaEvent(following ? 'Tag-Follow' : 'Tag-Unfollow', tag);
sendMatomoEvent('Tag', following ? 'Tag-Follow' : 'Tag-Unfollow', tag);
},
channelBlockEvent: (uri, blocked, location) => {
- sendGaEvent(blocked ? 'Channel-Hidden' : 'Channel-Unhidden', uri);
sendMatomoEvent(blocked ? 'Channel-Hidden' : 'Channel-Unhidden', uri);
},
emailProvidedEvent: () => {
- sendGaEvent('Engagement', 'Email-Provided');
sendMatomoEvent('Engagement', 'Email-Provided');
},
emailVerifiedEvent: () => {
- sendGaEvent('Engagement', 'Email-Verified');
sendMatomoEvent('Engagement', 'Email-Verified');
},
rewardEligibleEvent: () => {
- sendGaEvent('Engagement', 'Reward-Eligible');
sendMatomoEvent('Engagement', 'Reward-Eligible');
},
openUrlEvent: (url: string) => {
- sendGaEvent('Engagement', 'Open-Url', url);
sendMatomoEvent('Engagement', 'Open-Url', url);
},
trendingAlgorithmEvent: (trendingAlgorithm: string) => {
- sendGaEvent('Engagement', 'Trending-Algorithm', trendingAlgorithm);
+ sendMatomoEvent('Engagement', 'Trending-Algorithm', trendingAlgorithm);
},
startupEvent: () => {
- sendGaEvent('Startup', 'Startup');
sendMatomoEvent('Startup', 'Startup');
},
readyEvent: (timeToReady: number) => {
- sendGaEvent('Startup', 'App-Ready');
- sendGaTimingEvent('Startup', 'App-Ready', timeToReady);
sendMatomoEvent('Startup', 'App-Ready', 'Time', timeToReady);
},
purchaseEvent: (purchaseInt: number) => {
- sendGaEvent('Purchase', 'Purchase-Complete', undefined, purchaseInt);
sendMatomoEvent('Purchase', 'Purchase-Complete', 'someLabel', purchaseInt);
},
};
-function sendGaEvent(category, action, label, value) {
- if (thirdPartyAnalyticsEnabled && isProduction) {
- ReactGA.event(
- {
- category,
- action,
- ...(label ? { label } : {}),
- ...(value ? { value } : {}),
- },
- [SECOND_TRACKER_NAME]
- );
- }
-}
-
function sendMatomoEvent(category, action, name, value) {
if (internalAnalyticsEnabled) {
const event = { category, action, name, value };
@@ -262,20 +224,6 @@ function sendMatomoEvent(category, action, name, value) {
}
}
-function sendGaTimingEvent(category: string, action: string, timeInMs: number, label?: string) {
- if (thirdPartyAnalyticsEnabled && isProduction) {
- ReactGA.timing(
- {
- category,
- variable: action,
- value: timeInMs,
- ...(label ? { label } : {}),
- },
- [SECOND_TRACKER_NAME]
- );
- }
-}
-
function sendPromMetric(name: string, value?: number) {
if (IS_WEB) {
let url = new URL(SDK_API_PATH + '/metric/ui');
@@ -285,31 +233,6 @@ function sendPromMetric(name: string, value?: number) {
}
}
-let gaTrackers = [];
-
-if (!IS_WEB) {
- gaTrackers.push({
- trackingId: DESKTOP_UA_ID,
- });
-} else {
- gaTrackers.push({
- trackingId: LBRY_TV_UA_ID,
- });
-
- const { search } = window.location;
- const urlParams = new URLSearchParams(search);
- const isPirateBayUser = urlParams.get('utm_source') === 'PB';
-
- if (!isPirateBayUser) {
- gaTrackers.push({
- trackingId: LBRY_TV_MINUS_PIRATE_BAY_UA_ID,
- gaOptions: {
- name: SECOND_TRACKER_NAME,
- },
- });
- }
-}
-
const MatomoInstance = new MatomoTracker({
urlBase: MATOMO_URL,
siteId: MATOMO_ID, // optional, default value: `1`
@@ -320,14 +243,6 @@ const MatomoInstance = new MatomoTracker({
// linkTracking: false // optional, default value: true
});
-ReactGA.initialize(gaTrackers, {
- testMode: process.env.NODE_ENV !== 'production',
- cookieDomain: 'auto',
- siteSpeedSampleRate: 100,
- // un-comment to see events as they are sent to google
- // debug: true,
-});
-
// Manually call the first page view
// React Router doesn't include this on `history.listen`
// @if TARGET='web'
@@ -335,8 +250,6 @@ analytics.pageView(window.location.pathname + window.location.search);
// @endif
// @if TARGET='app'
-ReactGA.set({ checkProtocolTask: null });
-ReactGA.set({ location: 'https://lbry.tv' });
analytics.pageView(
window.location.pathname.split('.html')[1] + window.location.search || generateInitialUrl(window.location.hash)
);
diff --git a/ui/component/button/view.jsx b/ui/component/button/view.jsx
index 8be0839eb..b57a9d72f 100644
--- a/ui/component/button/view.jsx
+++ b/ui/component/button/view.jsx
@@ -5,7 +5,6 @@ import Icon from 'component/common/icon';
import classnames from 'classnames';
import { NavLink } from 'react-router-dom';
import { formatLbryUrlForWeb } from 'util/url';
-import { OutboundLink } from 'react-ga';
import * as PAGES from 'constants/pages';
import useCombinedRefs from 'effects/use-combined-refs';
@@ -129,19 +128,12 @@ const Button = forwardRef((props: Props, ref: any) => {
{iconRight && }
);
-
+ // TODO: replace the below with an outbound link tracker for matomo
if (href) {
return (
-
+
{content}
-
+
);
}
diff --git a/ui/component/channelContent/view.jsx b/ui/component/channelContent/view.jsx
index ec916beca..c34818a15 100644
--- a/ui/component/channelContent/view.jsx
+++ b/ui/component/channelContent/view.jsx
@@ -73,7 +73,7 @@ function ChannelContent(props: Props) {
injectedItem={!isAuthenticated && IS_WEB && }
/>
) : (
- {__("This channel hasn't published anything yet")}
+ This channel hasn't published anything yet
)}
);
diff --git a/ui/component/claimInsufficientCredits/view.jsx b/ui/component/claimInsufficientCredits/view.jsx
index e9162a098..6d7d33fc2 100644
--- a/ui/component/claimInsufficientCredits/view.jsx
+++ b/ui/component/claimInsufficientCredits/view.jsx
@@ -7,7 +7,7 @@ type Props = {
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
- claimWasPurchased: boolean,
+ claimWasPurchased: boolea,
};
function ClaimInsufficientCredits(props: Props) {
diff --git a/ui/component/claimPreview/index.js b/ui/component/claimPreview/index.js
index 20eeb0d2c..0a39ef6aa 100644
--- a/ui/component/claimPreview/index.js
+++ b/ui/component/claimPreview/index.js
@@ -5,6 +5,7 @@ import {
makeSelectIsUriResolving,
makeSelectClaimIsMine,
makeSelectClaimIsPending,
+ makeSelectThumbnailForUri,
makeSelectCoverForUri,
makeSelectClaimIsNsfw,
selectBlockedChannels,
@@ -27,6 +28,7 @@ const select = (state, props) => ({
obscureNsfw: !selectShowMatureContent(state),
claimIsMine: props.uri && makeSelectClaimIsMine(props.uri)(state),
isResolvingUri: props.uri && makeSelectIsUriResolving(props.uri)(state),
+ thumbnail: props.uri && makeSelectThumbnailForUri(props.uri)(state),
cover: props.uri && makeSelectCoverForUri(props.uri)(state),
nsfw: props.uri && makeSelectClaimIsNsfw(props.uri)(state),
blackListedOutpoints: selectBlackListedOutpoints(state),
diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx
index ef1960c62..e11b50eb4 100644
--- a/ui/component/claimPreview/view.jsx
+++ b/ui/component/claimPreview/view.jsx
@@ -34,6 +34,7 @@ type Props = {
resolveUri: string => void,
isResolvingUri: boolean,
history: { push: string => void },
+ thumbnail: string,
title: string,
nsfw: boolean,
placeholder: string,
@@ -70,6 +71,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => {
history,
uri,
isResolvingUri,
+ thumbnail,
nsfw,
resolveUri,
claim,
@@ -157,7 +159,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => {
// Weird placement warning
// Make sure this happens after we figure out if this claim needs to be hidden
- const thumbnailUrl = useGetThumbnail(uri, claim, streamingUrl, getFile, shouldHide);
+ const thumbnailUrl = useGetThumbnail(uri, claim, streamingUrl, getFile, shouldHide) || thumbnail;
function handleContextMenu(e) {
// @if TARGET='app'
diff --git a/ui/component/common/icon-custom.jsx b/ui/component/common/icon-custom.jsx
index a1da0dc19..2468dc630 100644
--- a/ui/component/common/icon-custom.jsx
+++ b/ui/component/common/icon-custom.jsx
@@ -634,11 +634,4 @@ export const icons = {
),
- [ICONS.REFRESH]: buildIcon(
-
-
-
- {' '}
-
- ),
};
diff --git a/ui/component/privacyAgreement/view.jsx b/ui/component/privacyAgreement/view.jsx
index 10a811745..cdd9c0860 100644
--- a/ui/component/privacyAgreement/view.jsx
+++ b/ui/component/privacyAgreement/view.jsx
@@ -7,13 +7,14 @@ import { Form } from 'component/common/form-components/form';
import { withRouter } from 'react-router-dom';
// $FlowFixMe cannot resolve ...
import image from 'static/img/unlocklbry.svg';
+import { WELCOME_VERSION } from 'config';
const FREE = 'free';
const LIMITED = 'limited';
const NONE = 'none';
type Props = {
- setWelcomeVersion: () => void,
+ setWelcomeVersion: number => void,
signOut: () => void,
setShareDataInternal: boolean => void,
setShareDataThirdParty: boolean => void,
@@ -37,7 +38,7 @@ function PrivacyAgreement(props: Props) {
setShareDataInternal(false);
setShareDataThirdParty(false);
}
- setWelcomeVersion();
+ setWelcomeVersion(WELCOME_VERSION);
history.replace(`/`);
}
diff --git a/ui/component/splash/view.jsx b/ui/component/splash/view.jsx
index bc7723265..23084f814 100644
--- a/ui/component/splash/view.jsx
+++ b/ui/component/splash/view.jsx
@@ -2,7 +2,6 @@
import type { Node } from 'react';
import * as MODALS from 'constants/modal_types';
import * as SETTINGS from 'constants/settings';
-import * as ICONS from 'constants/icons';
import React from 'react';
import { Lbry } from 'lbry-redux';
import Button from 'component/button';
@@ -308,11 +307,7 @@ export default class SplashScreen extends React.PureComponent {
+
),
}}
>
@@ -321,14 +316,7 @@ export default class SplashScreen extends React.PureComponent {
}
- actions={
-