diff --git a/public/index.html b/public/index.html index aa069f2..d5963be 100644 --- a/public/index.html +++ b/public/index.html @@ -1,6 +1,15 @@
+ + + + + diff --git a/src/App.js b/src/App.js index d0e8346..9d45cda 100644 --- a/src/App.js +++ b/src/App.js @@ -15,6 +15,11 @@ import Education from "./components/Education"; import Project from "./components/Project"; import { setRepo } from "./store/slices/repoSlice"; import Blog from "./components/Blog"; +import { ga } from "./helpers/utils"; + +if (config.googleAnalytics.id) { + ga.initialize(config.googleAnalytics.id); +} function App() { const dispatch = useDispatch(); diff --git a/src/components/Blog.js b/src/components/Blog.js index 4194fd9..9b9e8c0 100644 --- a/src/components/Blog.js +++ b/src/components/Blog.js @@ -4,7 +4,7 @@ import { useEffect, useState } from "react"; import { CgHashtag } from 'react-icons/cg'; import { useSelector } from "react-redux"; import config from "../config"; -import { skeleton } from "../helpers/utils"; +import { ga, skeleton } from "../helpers/utils"; import LazyImage from "./LazyImage"; const Blog = () => { @@ -82,10 +82,19 @@ const Blog = () => { const renderArticles = () => { return articles && articles.slice(0, config.blog.limit).map((article, index) => ( -