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