forked from Transparency/kgroad-frontend2
Added google analytics and net.kg analytics
This commit is contained in:
parent
c3a94c920f
commit
2e03fd9175
@ -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 />
|
||||||
|
@ -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)+"&page="+escape(window.location.href);
|
||||||
|
document.cookie="astratop=1; path=/";
|
||||||
|
java1+="&c="+(document.cookie?"yes":"now");
|
||||||
|
</script>
|
||||||
|
<script language="javascript1.1" type="text/javascript">
|
||||||
|
java="1.1";
|
||||||
|
java1+="&java="+(navigator.javaEnabled()?"yes":"now");
|
||||||
|
</script>
|
||||||
|
<script language="javascript1.2" type="text/javascript">
|
||||||
|
java="1.2";
|
||||||
|
java1+="&razresh="+screen.width+'x'+screen.height+"&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+="&jscript="+java+"&rand="+Math.random();
|
||||||
|
document.write("<a href='http://www.net.kg/stat.php?id=7235&fromsite=7235' target='_blank'>"+
|
||||||
|
"<img src='http://www.net.kg/img.php?id=7235&"+java1+
|
||||||
|
"' border='0' alt='WWW.NET.KG' width='88' height='31' /></a>");
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
|
<a href='http://www.net.kg/stat.php?id=7235&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">
|
||||||
|
Loading…
Reference in New Issue
Block a user