chore(client): clean up GA (#40856)

This commit is contained in:
Ahmad Abdolsaheb
2021-02-01 17:26:48 +03:00
committed by GitHub
parent e5b43edf84
commit 3a710d2cb1
2 changed files with 0 additions and 32 deletions

View File

@ -1,29 +0,0 @@
const isBrowser = typeof window !== 'undefined';
if (isBrowser) {
window.dataLayer = window.dataLayer || [];
}
function gtag() {
if (isBrowser) {
window.dataLayer.push(arguments);
}
}
gtag('js', new Date());
gtag('config', 'AW-795617839');
export function gtagReportConversion(url) {
var callback = function() {
if (typeof url !== 'undefined' && isBrowser) {
window.location = url;
}
};
if (isBrowser) {
gtag('event', 'conversion', {
/* eslint-disable camelcase */
send_to: 'AW-795617839/AmfiCKHHs4gBEK_UsPsC',
event_callback: callback
});
}
return false;
}

View File

@ -8,8 +8,6 @@ import { useTranslation } from 'react-i18next';
import { isSignedInSelector } from '../../../redux';
import { apiLocation, homeLocation } from '../../../../config/env.json';
import { gtagReportConversion } from '../../../analytics/gtag';
import './login.css';
const mapStateToProps = createSelector(
@ -34,7 +32,6 @@ function Login(props) {
className={(block ? 'btn-cta-big btn-block' : '') + ' signup-btn btn-cta'}
data-test-label={dataTestLabel}
href={href}
onClick={() => gtagReportConversion()}
>
{children || t('buttons.sign-in')}
</Button>