Delete pixel experiment (#683)

This commit is contained in:
infinite-persistence 2022-01-12 07:14:44 -08:00 committed by GitHub
parent 3d246a30ba
commit 431f55ef26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 61 deletions

View file

@ -17,7 +17,6 @@ import ScheduledStreams from 'component/scheduledStreams';
import { splitBySeparator } from 'util/lbryURI';
// @if TARGET='web'
import Pixel from 'web/component/pixel';
import Meme from 'web/component/meme';
// @endif
@ -187,9 +186,6 @@ function HomePage(props: Props) {
})}
</>
)}
{/* @if TARGET='web' */}
<Pixel type={'retargeting'} />
{/* @endif */}
</Page>
);
}

View file

@ -8,9 +8,7 @@ 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,
@ -134,9 +132,6 @@ function SignInVerifyPage(props: Props) {
}
/>
</div>
{/* @if TARGET='web' */}
<Pixel type={'kill'} />
{/* @endif */}
</Page>
);
}

View file

@ -1,9 +0,0 @@
import { connect } from 'react-redux';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import Pixel from './view';
const select = (state) => ({
isAuthenticated: Boolean(selectUserVerifiedEmail(state)),
});
export default connect(select)(Pixel);

View file

@ -1,42 +0,0 @@
// @flow
import React from 'react';
import { SIMPLE_SITE } from 'config';
import { useIsMobile } from 'effects/use-screensize';
type Props = {
type: string,
isAuthenticated: boolean,
};
const Pixel = (props: Props) => {
const { type, isAuthenticated } = props;
const isMobile = useIsMobile();
// TODO: restrict to country
if (!SIMPLE_SITE || isMobile || isAuthenticated) {
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;