Merge pull request #6474 from lbryio/retargeting-changes
move pixel to web
This commit is contained in:
commit
da43ad2831
3 changed files with 49 additions and 13 deletions
|
@ -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<Tag>,
|
||||
|
@ -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 && (
|
||||
<img
|
||||
src="https://ctrack.trafficjunky.net/ctrack?action=list&type=add&id=0&context=Odysee&cookiename=RetargetingPixel&age=44000&maxcookiecount=10"
|
||||
alt=""
|
||||
/>
|
||||
)}
|
||||
{/* @if TARGET='web' */}
|
||||
<Pixel type={'retargeting'} />
|
||||
{/* @endif */}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,7 +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,
|
||||
|
@ -132,11 +134,9 @@ function SignInVerifyPage(props: Props) {
|
|||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<img
|
||||
src="https://ctrack.trafficjunky.net/ctrack?action=list&type=add&id=0&context=Odysee&cookiename=KillPixel&age=0&maxcookiecount=10"
|
||||
alt=""
|
||||
/>
|
||||
{/* @if TARGET='web' */}
|
||||
<Pixel type={'kill'} />
|
||||
{/* @endif */}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
36
web/component/pixel.jsx
Normal file
36
web/component/pixel.jsx
Normal file
|
@ -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 (
|
||||
<>
|
||||
<img
|
||||
src="https://ctrack.trafficjunky.net/ctrack?action=list&type=add&id=0&context=Odysee&cookiename=RetargetingPixel&age=44000&maxcookiecount=10"
|
||||
alt=""
|
||||
/>
|
||||
</>
|
||||
);
|
||||
} else if (type === 'kill') {
|
||||
return (
|
||||
<>
|
||||
<img
|
||||
src="https://ctrack.trafficjunky.net/ctrack?action=list&type=add&id=0&context=Odysee&cookiename=KillPixel&age=0&maxcookiecount=10"
|
||||
alt=""
|
||||
/>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export default Pixel;
|
Loading…
Reference in a new issue