feat: ajoute balise Google
This commit is contained in:
parent
4e2ec9b631
commit
0988149c96
1 changed files with 9 additions and 14 deletions
|
|
@ -1,15 +1,12 @@
|
||||||
---
|
---
|
||||||
// Importing necessary components
|
|
||||||
import Meta from "@components/Meta.astro";
|
import Meta from "@components/Meta.astro";
|
||||||
import Navbar from "@components/sections/navbar&footer/Navbar.astro";
|
import Navbar from "@components/sections/navbar&footer/Navbar.astro";
|
||||||
import FooterSection from "@components/sections/navbar&footer/FooterSection.astro";
|
import FooterSection from "@components/sections/navbar&footer/FooterSection.astro";
|
||||||
import { SITE } from "@data/constants";
|
import { SITE } from "@data/constants";
|
||||||
import type { Thing, WithContext } from "schema-dts";
|
import type { Thing, WithContext } from "schema-dts";
|
||||||
|
|
||||||
// Setting expected props
|
|
||||||
const { title = SITE.title, meta, structuredData, lang = "fr" } = Astro.props;
|
const { title = SITE.title, meta, structuredData, lang = "fr" } = Astro.props;
|
||||||
|
|
||||||
// Interface to type-check the properties
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title?: string;
|
title?: string;
|
||||||
meta?: string;
|
meta?: string;
|
||||||
|
|
@ -18,18 +15,11 @@ interface Props {
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
|
||||||
This is the main structure for the page.
|
|
||||||
We set the language of the page to English and add classes for scrollbar and scroll behavior.
|
|
||||||
-->
|
|
||||||
<html lang={lang} class="scrollbar-hide lenis lenis-smooth scroll-pt-16">
|
<html lang={lang} class="scrollbar-hide lenis lenis-smooth scroll-pt-16">
|
||||||
<head>
|
<head>
|
||||||
<!-- Adding metadata to the HTML document -->
|
|
||||||
<Meta meta={meta} structuredData={structuredData} />
|
<Meta meta={meta} structuredData={structuredData} />
|
||||||
<!-- Define the title of the page -->
|
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
// Script to handle dark mode. It will check if the theme is stored in localStorage or if dark theme is preferred by system settings
|
|
||||||
if (
|
if (
|
||||||
localStorage.getItem("hs_theme") === "dark" ||
|
localStorage.getItem("hs_theme") === "dark" ||
|
||||||
(!("hs_theme" in localStorage) &&
|
(!("hs_theme" in localStorage) &&
|
||||||
|
|
@ -44,14 +34,11 @@ We set the language of the page to English and add classes for scrollbar and scr
|
||||||
import "@scripts/lenisSmoothScroll.js";
|
import "@scripts/lenisSmoothScroll.js";
|
||||||
</script>
|
</script>
|
||||||
<script is:inline defer data-domain="achat-maison-albi.fr" src="https://plausible.io/js/script.outbound-links.js"></script>
|
<script is:inline defer data-domain="achat-maison-albi.fr" src="https://plausible.io/js/script.outbound-links.js"></script>
|
||||||
|
<script is:inline async src="https://www.googletagmanager.com/gtag/js?id=AW-16961312227"></script>
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
class="bg-neutral-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-neutral-800"
|
class="bg-neutral-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-neutral-800"
|
||||||
>
|
>
|
||||||
<!--
|
|
||||||
Setting up the main structure of the page.
|
|
||||||
The Navbar is placed at the top, with a slot for the main content and FooterSection at the bottom.
|
|
||||||
-->
|
|
||||||
<div class="mx-auto max-w-screen-2xl px-4 sm:px-6 lg:px-8">
|
<div class="mx-auto max-w-screen-2xl px-4 sm:px-6 lg:px-8">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<main>
|
<main>
|
||||||
|
|
@ -72,3 +59,11 @@ We set the language of the page to English and add classes for scrollbar and scr
|
||||||
</style>
|
</style>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
<script is:inline>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'AW-16961312227');
|
||||||
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue