add analytics back to blog posts
This commit is contained in:
parent
4613d9bc4c
commit
6975792e5c
3 changed files with 4 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
import Author from './Author.astro';
|
||||
import GithubStarButton from './GithubStarButton.astro';
|
||||
import GoogleAnalytics from './GoogleAnalytics.astro';
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
|
@ -25,6 +26,7 @@ const { title, author, publishDate, heroImage } = Astro.props;
|
|||
<slot />
|
||||
</main>
|
||||
</article>
|
||||
<GoogleAnalytics />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
@ -115,15 +115,6 @@ npm run dev
|
|||
</Note>
|
||||
</Markdown>
|
||||
</BlogPost>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-130280175-15"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-130280175-15');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
import BaseHead from '../components/BaseHead.astro';
|
||||
import Space from '../components/Space.astro';
|
||||
import Main from '../components/Main.astro';
|
||||
import Logo from '../components/Logo.astro';
|
||||
import Article from '../components/Article.astro';
|
||||
import Tagline from '../components/Tagline.astro';
|
||||
import MainHeader from '../components/MainHeader.astro';
|
||||
import Sponsors from '../components/Sponsors.astro';
|
||||
import GoogleAnalytics from '../components/GoogleAnalytics.astro';
|
||||
import YouTube from '../components/YouTube.astro';
|
||||
import "../components/YouTube.css";
|
||||
|
||||
|
@ -104,14 +104,6 @@ let lang = 'en';
|
|||
<script>
|
||||
console.log('%cGet early Astro access 👉 https://astro.build/chat', "color:#17c083; font-size: 1.2em; padding: 1em;");
|
||||
</script>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-130280175-15"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-130280175-15');
|
||||
</script>
|
||||
<GoogleAnalytics />
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue