From 0edea00943b3b5d89ae6a3a2e815d3debdf321e9 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Sun, 23 Feb 2020 20:24:09 -0500 Subject: [PATCH] call publish analytics event for reposts --- package.json | 2 +- static/app-strings.json | 6 ++++-- ui/analytics.js | 1 + ui/modal/modalRepost/view.jsx | 4 +++- yarn.lock | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2b40633d4..1b51703dd 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#b4fbc212ca6008ec05c31116182bf6dfa7a1cbcb", + "lbry-redux": "lbryio/lbry-redux#6f9ee589a7834851b2fc9d97f807fbc0a0dd6451", "lbryinc": "lbryio/lbryinc#6a59102c52673502569d2c43bd4ee58c315fb2e4", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/static/app-strings.json b/static/app-strings.json index 768f1f5de..48fd372f9 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -982,5 +982,7 @@ "Do you agree to the %terms%?": "Do you agree to the %terms%?", "While we respect the desire for maximally private usage, please note that choosing this option hurts the ability for creators to understand how their content is performing.": "While we respect the desire for maximally private usage, please note that choosing this option hurts the ability for creators to understand how their content is performing.", "A copy of your wallet is synced to lbry.tv": "A copy of your wallet is synced to lbry.tv", - "Internal sharing is required while signed in.": "Internal sharing is required while signed in." -} + "Internal sharing is required while signed in.": "Internal sharing is required while signed in.", + "Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.": "Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.", + "FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone." +} \ No newline at end of file diff --git a/ui/analytics.js b/ui/analytics.js index e5c2c786f..faeffd21a 100644 --- a/ui/analytics.js +++ b/ui/analytics.js @@ -160,6 +160,7 @@ const analytics: Analytics = { if (channelClaimId) { params['channel_claim_id'] = channelClaimId; } + Lbryio.call('event', 'publish', params); } }, diff --git a/ui/modal/modalRepost/view.jsx b/ui/modal/modalRepost/view.jsx index a82e396f0..1cb20279e 100644 --- a/ui/modal/modalRepost/view.jsx +++ b/ui/modal/modalRepost/view.jsx @@ -11,6 +11,7 @@ import { FormField } from 'component/common/form'; import { parseURI, isNameValid, creditsToString } from 'lbry-redux'; import usePersistedState from 'effects/use-persisted-state'; import I18nMessage from 'component/i18nMessage'; +import analytics from 'analytics'; type Props = { doHideModal: () => void, @@ -105,7 +106,8 @@ function ModalRepost(props: Props) { bid: creditsToString(repostBid), channel_id: channelToRepostTo.claim_id, claim_id: contentClaimId, - }).then(() => { + }).then((repostClaim: StreamClaim) => { + analytics.apiLogPublish(repostClaim); doHideModal(); doToast({ message: __('Woohoo! Sucessfully reposted this claim.') }); }); diff --git a/yarn.lock b/yarn.lock index 890f0d581..51c7f5754 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7174,9 +7174,9 @@ lazy-val@^1.0.4: yargs "^13.2.2" zstd-codec "^0.1.1" -lbry-redux@lbryio/lbry-redux#b4fbc212ca6008ec05c31116182bf6dfa7a1cbcb: +lbry-redux@lbryio/lbry-redux#6f9ee589a7834851b2fc9d97f807fbc0a0dd6451: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/b4fbc212ca6008ec05c31116182bf6dfa7a1cbcb" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/6f9ee589a7834851b2fc9d97f807fbc0a0dd6451" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0"