Skip to content

Commit a2ffc41

Browse files
María Paz Arrieta LandazuriMaría Paz Arrieta Landazuri
authored andcommitted
Add meta tag verification and improve AdSense implementation
1 parent 0a35649 commit a2ffc41

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

frontend/src/pages/_document.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@ export default function Document() {
44
return (
55
<Html lang="es">
66
<Head>
7+
{/* Meta tag verification */}
8+
<meta name="google-adsense-account" content="ca-pub-5179832879235237" />
9+
10+
{/* AdSense Script */}
711
<script
812
async
913
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5179832879235237"
1014
crossOrigin="anonymous"
1115
/>
16+
17+
{/* AdSense Initialization */}
1218
<script
1319
dangerouslySetInnerHTML={{
1420
__html: `
15-
window.adsbygoogle = window.adsbygoogle || [];
16-
window.adsbygoogle.push({
17-
google_ad_client: "ca-pub-5179832879235237",
18-
enable_page_level_ads: true
19-
});
21+
(function() {
22+
window.adsbygoogle = window.adsbygoogle || [];
23+
window.adsbygoogle.push({
24+
google_ad_client: "ca-pub-5179832879235237",
25+
enable_page_level_ads: true
26+
});
27+
})();
2028
`,
2129
}}
2230
/>

0 commit comments

Comments
 (0)