Skip to content

Commit

Permalink
Merge pull request #26 from untilhamza/fix/google-analytics-not-working
Browse files Browse the repository at this point in the history
Fix/google analytics not working
  • Loading branch information
untilhamza authored Aug 31, 2022
2 parents eb7e662 + 5075d48 commit 4727c2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/components/GoogleAnalytics.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import React from "react";
import { Helmet } from "react-helmet";

const GoogleAnalytics = () => {
return (
<>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N2D42P9687"></script>
<script>
{` window.dataLayer = window.dataLayer || [];
<Helmet>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N2D42P9687"></script>
<script>
{` window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-N2D42P9687');
`}
</script>
</script>
</Helmet>
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.3.0"
"version": "1.3.1"
}

0 comments on commit 4727c2d

Please sign in to comment.