Merge pull request #6438 from lbryio/retargetting-pix
add retargeting pixel
This commit is contained in:
commit
fba8b89b3b
3 changed files with 50 additions and 2 deletions
|
@ -13,6 +13,10 @@ import LbcSymbol from 'component/common/lbc-symbol';
|
||||||
import WaitUntilOnPage from 'component/common/wait-until-on-page';
|
import WaitUntilOnPage from 'component/common/wait-until-on-page';
|
||||||
import useGetLivestreams from 'effects/use-get-livestreams';
|
import useGetLivestreams from 'effects/use-get-livestreams';
|
||||||
|
|
||||||
|
// @if TARGET='web'
|
||||||
|
import Pixel from 'web/component/pixel';
|
||||||
|
// @endif
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
authenticated: boolean,
|
authenticated: boolean,
|
||||||
followedTags: Array<Tag>,
|
followedTags: Array<Tag>,
|
||||||
|
@ -137,6 +141,9 @@ function HomePage(props: Props) {
|
||||||
{rowData.map(({ title, route, link, icon, help, options = {} }, index) => {
|
{rowData.map(({ title, route, link, icon, help, options = {} }, index) => {
|
||||||
return getRowElements(title, route, link, icon, help, options, index);
|
return getRowElements(title, route, link, icon, help, options, index);
|
||||||
})}
|
})}
|
||||||
|
{/* @if TARGET='web' */}
|
||||||
|
<Pixel type={'retargeting'} />
|
||||||
|
{/* @endif */}
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,11 @@ import Button from 'component/button';
|
||||||
import { Lbryio } from 'lbryinc';
|
import { Lbryio } from 'lbryinc';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
|
// @if TARGET='web'
|
||||||
|
import Pixel from 'web/component/pixel';
|
||||||
|
// @endif
|
||||||
type Props = {
|
type Props = {
|
||||||
history: { push: string => void, location: { search: string } },
|
history: { push: (string) => void, location: { search: string } },
|
||||||
doToast: ({}) => void,
|
doToast: ({}) => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,6 +134,9 @@ function SignInVerifyPage(props: Props) {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{/* @if TARGET='web' */}
|
||||||
|
<Pixel type={'kill'} />
|
||||||
|
{/* @endif */}
|
||||||
</Page>
|
</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