mirror of
https://github.com/10h30/astroplate.git
synced 2026-06-05 15:08:00 +09:00
added gtm support
This commit is contained in:
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "astroplate",
|
||||
"version": "5.4.3",
|
||||
"version": "5.5.0",
|
||||
"description": "Astro and Tailwindcss boilerplate",
|
||||
"author": "zeon.studio",
|
||||
"license": "MIT",
|
||||
@@ -21,6 +21,7 @@
|
||||
"@astrojs/react": "4.2.4",
|
||||
"@astrojs/rss": "4.0.11",
|
||||
"@astrojs/sitemap": "3.3.0",
|
||||
"@digi4care/astro-google-tagmanager": "^1.4.0",
|
||||
"@justinribeiro/lite-youtube": "^1.7.1",
|
||||
"astro": "5.7.4",
|
||||
"astro-auto-import": "^0.4.4",
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
"link": "https://github.com/zeon-studio/astroplate"
|
||||
},
|
||||
|
||||
"google_tag_manager": {
|
||||
"enable": false,
|
||||
"gtm_id": "GTM-XXXXXX"
|
||||
},
|
||||
|
||||
"disqus": {
|
||||
"enable": true,
|
||||
"shortname": "themefisher-template",
|
||||
|
||||
@@ -6,6 +6,10 @@ import { plainify } from "@/lib/utils/textConverter";
|
||||
import Footer from "@/partials/Footer.astro";
|
||||
import Header from "@/partials/Header.astro";
|
||||
import "@/styles/main.css";
|
||||
import {
|
||||
GoogleTagmanager,
|
||||
GoogleTagmanagerNoscript,
|
||||
} from "@digi4care/astro-google-tagmanager";
|
||||
import { AstroFont } from "astro-font";
|
||||
import { ClientRouter } from "astro:transitions";
|
||||
import SearchModal from "./helpers/SearchModal";
|
||||
@@ -44,6 +48,12 @@ const { title, meta_title, description, image, noindex, canonical } =
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- google tag manager -->
|
||||
{
|
||||
config.google_tag_manager.enable && (
|
||||
<GoogleTagmanager id={config.google_tag_manager.gtm_id} />
|
||||
)
|
||||
}
|
||||
<!-- favicon -->
|
||||
<link rel="shortcut icon" href={config.site.favicon} />
|
||||
<!-- theme meta -->
|
||||
@@ -171,6 +181,13 @@ const { title, meta_title, description, image, noindex, canonical } =
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
</head>
|
||||
<body>
|
||||
{/* google tag manager noscript */}
|
||||
{
|
||||
config.google_tag_manager.enable && (
|
||||
<GoogleTagmanagerNoscript id={config.google_tag_manager.gtm_id} />
|
||||
)
|
||||
}
|
||||
|
||||
<TwSizeIndicator />
|
||||
<Header />
|
||||
<SearchModal client:load />
|
||||
|
||||
Reference in New Issue
Block a user