diff --git a/client/src/analytics/gtag.js b/client/src/analytics/gtag.js deleted file mode 100644 index 0d49f3a1e2..0000000000 --- a/client/src/analytics/gtag.js +++ /dev/null @@ -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; -} diff --git a/client/src/components/Header/components/Login.js b/client/src/components/Header/components/Login.js index af3df1ef04..3551d1415a 100644 --- a/client/src/components/Header/components/Login.js +++ b/client/src/components/Header/components/Login.js @@ -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')}