Skip to content

Commit

Permalink
Add Google Analytics tag and MathJax script to Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
davidawad committed Nov 1, 2023
1 parent c57c33b commit ddaa85a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SITE } from "@config";
import "@styles/base.css";
const googleSiteVerification = import.meta.env.PUBLIC_GOOGLE_SITE_VERIFICATION;
const googleAnalyticsTag = 'G-B29WM3F6QJ';
export interface Props {
title?: string;
Expand Down Expand Up @@ -79,7 +80,20 @@ const socialImageURL = new URL(
)
}

<!-- Polyfill -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>

<!-- Google tag (gtag.js) -->
<script async src=`https://www.googletagmanager.com/gtag/js?id=G-B29WM3F6QJ`></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-B29WM3F6QJ');
</script>

<!-- MathJax -->
<script>
window.MathJax = {
tex: {
Expand Down

0 comments on commit ddaa85a

Please sign in to comment.