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 Author from './Author.astro';
|
||||||
import GithubStarButton from './GithubStarButton.astro';
|
import GithubStarButton from './GithubStarButton.astro';
|
||||||
|
import GoogleAnalytics from './GoogleAnalytics.astro';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -25,6 +26,7 @@ const { title, author, publishDate, heroImage } = Astro.props;
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
</article>
|
</article>
|
||||||
|
<GoogleAnalytics />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -115,15 +115,6 @@ npm run dev
|
||||||
</Note>
|
</Note>
|
||||||
</Markdown>
|
</Markdown>
|
||||||
</BlogPost>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
import BaseHead from '../components/BaseHead.astro';
|
import BaseHead from '../components/BaseHead.astro';
|
||||||
import Space from '../components/Space.astro';
|
import Space from '../components/Space.astro';
|
||||||
import Main from '../components/Main.astro';
|
import Main from '../components/Main.astro';
|
||||||
import Logo from '../components/Logo.astro';
|
|
||||||
import Article from '../components/Article.astro';
|
import Article from '../components/Article.astro';
|
||||||
import Tagline from '../components/Tagline.astro';
|
import Tagline from '../components/Tagline.astro';
|
||||||
import MainHeader from '../components/MainHeader.astro';
|
import MainHeader from '../components/MainHeader.astro';
|
||||||
import Sponsors from '../components/Sponsors.astro';
|
import Sponsors from '../components/Sponsors.astro';
|
||||||
|
import GoogleAnalytics from '../components/GoogleAnalytics.astro';
|
||||||
import YouTube from '../components/YouTube.astro';
|
import YouTube from '../components/YouTube.astro';
|
||||||
import "../components/YouTube.css";
|
import "../components/YouTube.css";
|
||||||
|
|
||||||
|
@ -104,14 +104,6 @@ let lang = 'en';
|
||||||
<script>
|
<script>
|
||||||
console.log('%cGet early Astro access 👉 https://astro.build/chat', "color:#17c083; font-size: 1.2em; padding: 1em;");
|
console.log('%cGet early Astro access 👉 https://astro.build/chat', "color:#17c083; font-size: 1.2em; padding: 1em;");
|
||||||
</script>
|
</script>
|
||||||
|
<GoogleAnalytics />
|
||||||
<!-- 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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue