Added google analytics and net.kg analytics

This commit is contained in:
Vladislav Khorev 2024-02-24 14:01:03 +00:00
parent c3a94c920f
commit 2e03fd9175
2 changed files with 49 additions and 0 deletions

View File

@ -6,6 +6,18 @@ import { Providers } from "./Providers";
import Navbar from "@/widgets/Navbar/Navbar"; import Navbar from "@/widgets/Navbar/Navbar";
import Footer from "@/widgets/Footer/Footer"; import Footer from "@/widgets/Footer/Footer";
const googleAnalyticsHtml = `
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0BMJ2KN7F8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-0BMJ2KN7F8');
</script>
`
export default function RootLayout({ export default function RootLayout({
children, children,
}: Readonly<{ }: Readonly<{
@ -13,6 +25,7 @@ export default function RootLayout({
}>) { }>) {
return ( return (
<html lang="en"> <html lang="en">
<head dangerouslySetInnerHTML={{ __html: googleAnalyticsHtml }} />
<body> <body>
<Providers> <Providers>
<Navbar /> <Navbar />

View File

@ -10,6 +10,41 @@ import app_store_btn from "./icons/app-store-btn.svg";
import play_market_btn from "./icons/play-market-btn.svg"; import play_market_btn from "./icons/play-market-btn.svg";
const Footer = () => { const Footer = () => {
const netKgFooterScript =`
<!-- WWW.NET.KG , code for http://kgroad.org -->
<script language="javascript" type="text/javascript">
java="1.0";
java1=""+"refer="+escape(document.referrer)+"&amp;page="+escape(window.location.href);
document.cookie="astratop=1; path=/";
java1+="&amp;c="+(document.cookie?"yes":"now");
</script>
<script language="javascript1.1" type="text/javascript">
java="1.1";
java1+="&amp;java="+(navigator.javaEnabled()?"yes":"now");
</script>
<script language="javascript1.2" type="text/javascript">
java="1.2";
java1+="&amp;razresh="+screen.width+'x'+screen.height+"&amp;cvet="+
(((navigator.appName.substring(0,3)=="Mic"))?
screen.colorDepth:screen.pixelDepth);
</script>
<script language="javascript1.3" type="text/javascript">java="1.3"</script>
<script language="javascript" type="text/javascript">
java1+="&amp;jscript="+java+"&amp;rand="+Math.random();
document.write("<a href='http://www.net.kg/stat.php?id=7235&amp;fromsite=7235' target='_blank'>"+
"<img src='http://www.net.kg/img.php?id=7235&amp;"+java1+
"' border='0' alt='WWW.NET.KG' width='88' height='31' /></a>");
</script>
<noscript>
<a href='http://www.net.kg/stat.php?id=7235&amp;fromsite=7235' target='_blank'><img
src="http://www.net.kg/img.php?id=7235" border='0' alt='WWW.NET.KG' width='88'
height='31' /></a>
</noscript>
<!-- /WWW.NET.KG -->
`
return ( return (
<footer className="footer"> <footer className="footer">
<Link href="/"> <Link href="/">
@ -26,6 +61,7 @@ const Footer = () => {
</li> </li>
))} ))}
</ul> </ul>
<div dangerouslySetInnerHTML={{ __html: netKgFooterScript }} />
</div> </div>
<div className="footer__contacts"> <div className="footer__contacts">