From f390320030487afb6450b0bd38e5080b301587da Mon Sep 17 00:00:00 2001 From: DispatchCommit Date: Thu, 8 Jul 2021 01:26:58 -0700 Subject: [PATCH 1/3] add retargeting pixel --- ui/page/home/view.jsx | 7 +++++++ ui/page/signInVerify/view.jsx | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ui/page/home/view.jsx b/ui/page/home/view.jsx index 1941091a3..78754d67b 100644 --- a/ui/page/home/view.jsx +++ b/ui/page/home/view.jsx @@ -128,6 +128,13 @@ function HomePage(props: Props) { {rowData.map(({ title, route, link, icon, help, options = {} }, index) => { return getRowElements(title, route, link, icon, help, options, index); })} + + {SIMPLE_SITE && ( + + )} ); } diff --git a/ui/page/signInVerify/view.jsx b/ui/page/signInVerify/view.jsx index 8abb8495b..acdf97a74 100644 --- a/ui/page/signInVerify/view.jsx +++ b/ui/page/signInVerify/view.jsx @@ -10,7 +10,7 @@ import I18nMessage from 'component/i18nMessage'; import Card from 'component/common/card'; type Props = { - history: { push: string => void, location: { search: string } }, + history: { push: (string) => void, location: { search: string } }, doToast: ({}) => void, }; @@ -132,6 +132,11 @@ function SignInVerifyPage(props: Props) { } /> + + ); } From e6376871d53713eadf552f53fc9ff1f1275d7793 Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 13 Jul 2021 23:40:49 -0400 Subject: [PATCH 2/3] move pixel to web --- ui/page/home/view.jsx | 14 +++++++------- ui/page/signInVerify/view.jsx | 9 ++++----- web/component/pixel.jsx | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 web/component/pixel.jsx diff --git a/ui/page/home/view.jsx b/ui/page/home/view.jsx index 78754d67b..bbfd1aad0 100644 --- a/ui/page/home/view.jsx +++ b/ui/page/home/view.jsx @@ -13,6 +13,10 @@ import LbcSymbol from 'component/common/lbc-symbol'; import WaitUntilOnPage from 'component/common/wait-until-on-page'; import useGetLivestreams from 'effects/use-get-livestreams'; +// @if TARGET='web' +import Pixel from 'web/component/pixel'; +// @endif + type Props = { authenticated: boolean, followedTags: Array, @@ -128,13 +132,9 @@ function HomePage(props: Props) { {rowData.map(({ title, route, link, icon, help, options = {} }, index) => { return getRowElements(title, route, link, icon, help, options, index); })} - - {SIMPLE_SITE && ( - - )} + {/* @if TARGET='web' */} + + {/* @endif */} ); } diff --git a/ui/page/signInVerify/view.jsx b/ui/page/signInVerify/view.jsx index acdf97a74..f201ff683 100644 --- a/ui/page/signInVerify/view.jsx +++ b/ui/page/signInVerify/view.jsx @@ -8,6 +8,7 @@ import Button from 'component/button'; import { Lbryio } from 'lbryinc'; import I18nMessage from 'component/i18nMessage'; import Card from 'component/common/card'; +import Pixel from 'web/component/pixel'; type Props = { history: { push: (string) => void, location: { search: string } }, @@ -132,11 +133,9 @@ function SignInVerifyPage(props: Props) { } /> - - + {/* @if TARGET='web' */} + + {/* @endif */} ); } diff --git a/web/component/pixel.jsx b/web/component/pixel.jsx new file mode 100644 index 000000000..697e378d3 --- /dev/null +++ b/web/component/pixel.jsx @@ -0,0 +1,36 @@ +// @flow +import React from 'react'; +import { SIMPLE_SITE } from 'config'; +type Props = { + type: string, +}; + +const Pixel = (props: Props) => { + const { type } = props; + if (!SIMPLE_SITE) { + return null; + } + if (type === 'retargeting') { + return ( + <> + + + ); + } else if (type === 'kill') { + return ( + <> + + + ); + } else { + return null; + } +}; + +export default Pixel; From f1c9aa7907690239811ed62eddbd7ff34ce5b37a Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 13 Jul 2021 23:45:51 -0400 Subject: [PATCH 3/3] review this --- ui/page/signInVerify/view.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/page/signInVerify/view.jsx b/ui/page/signInVerify/view.jsx index f201ff683..39964e677 100644 --- a/ui/page/signInVerify/view.jsx +++ b/ui/page/signInVerify/view.jsx @@ -8,8 +8,9 @@ import Button from 'component/button'; import { Lbryio } from 'lbryinc'; import I18nMessage from 'component/i18nMessage'; import Card from 'component/common/card'; +// @if TARGET='web' import Pixel from 'web/component/pixel'; - +// @endif type Props = { history: { push: (string) => void, location: { search: string } }, doToast: ({}) => void,