<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<script src="https://js.tosspayments.com/v1"></script><!--PG TOSSPAYMENTS-->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-577DV87WTC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-577DV87WTC');
</script>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
import ReactGA from "react-ga4";
//google analytics connect
ReactGA.initialize(process.env.REACT_APP_GOOGLE_ANALYTICS);
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);
//------------------------------ MODULE -------------------------------------
import ...
import ReactGA4 from 'react-ga4';
//------------------------------ CSS ----------------------------------------
style ...
//------------------------------ COMPONENT ----------------------------------
const Description = React.memo(({id, closeEvent}) => {
logic ...
useEffect(() => {
//google analytics send
const thisId = nowId ? nowId : state.id;
ReactGA4.send({hitType: "pageview", path: `/Description/${thisId}`, location: `/Description/${thisId}`, title: `/Description/${thisId}`});
...
}, []);
//render
return (
<SimpleMotion>
<StyledDescription>
{shareGear}
<StyledHeader id="webDescHeader">
<StyledBack size='2em' onClick={moveBack}/>
</StyledHeader>
<StyledContainer>
{loading? <StyledBannerLoading /> : bannerGear}
{infoGear}
{myTeamGear}
{partyGear}
{reviewGear}
{sellerGear}
{detailGear}
{linkGear}
{buyGear}
</StyledContainer>
{modalGear}
{optionWindowGear}
{loginAlertGear}
{alertGear}
{htmlGear}
</StyledDescription>
</SimpleMotion>
);
});
export default Description;
});
export default Navigation;