gtag workaround
This commit is contained in:
parent
936fa987cb
commit
9f4dd67156
2 changed files with 25 additions and 7 deletions
|
|
@ -7,12 +7,12 @@ module.exports = {
|
|||
plugins: [
|
||||
"gatsby-plugin-sass",
|
||||
"gatsby-plugin-image",
|
||||
{
|
||||
resolve: "gatsby-plugin-google-analytics",
|
||||
options: {
|
||||
trackingId: "G-8M9CZ79T4L",
|
||||
},
|
||||
},
|
||||
// {
|
||||
// resolve: "gatsby-plugin-google-analytics",
|
||||
// options: {
|
||||
// trackingId: "G-8M9CZ79T4L",
|
||||
// },
|
||||
// },
|
||||
"gatsby-plugin-react-helmet",
|
||||
"gatsby-plugin-sitemap",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import * as React from "react";
|
||||
import { Script } from "gatsby";
|
||||
import { Seo } from "../components/seo";
|
||||
|
||||
import "../assets/stylesheets/style.scss";
|
||||
|
|
@ -11,4 +12,21 @@ const IndexPage = () => {
|
|||
|
||||
export default IndexPage;
|
||||
|
||||
export const Head = () => <Seo title="MID Creative"/>;
|
||||
export const Head = () => (
|
||||
<>
|
||||
<Seo title="MID Creative" />;
|
||||
<Script
|
||||
async
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-8M9CZ79T4L"
|
||||
></Script>
|
||||
<Script>
|
||||
{`
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-8M9CZ79T4L');
|
||||
`}
|
||||
</Script>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue