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: [
|
plugins: [
|
||||||
"gatsby-plugin-sass",
|
"gatsby-plugin-sass",
|
||||||
"gatsby-plugin-image",
|
"gatsby-plugin-image",
|
||||||
{
|
// {
|
||||||
resolve: "gatsby-plugin-google-analytics",
|
// resolve: "gatsby-plugin-google-analytics",
|
||||||
options: {
|
// options: {
|
||||||
trackingId: "G-8M9CZ79T4L",
|
// trackingId: "G-8M9CZ79T4L",
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
"gatsby-plugin-react-helmet",
|
"gatsby-plugin-react-helmet",
|
||||||
"gatsby-plugin-sitemap",
|
"gatsby-plugin-sitemap",
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
import { Script } from "gatsby";
|
||||||
import { Seo } from "../components/seo";
|
import { Seo } from "../components/seo";
|
||||||
|
|
||||||
import "../assets/stylesheets/style.scss";
|
import "../assets/stylesheets/style.scss";
|
||||||
|
|
@ -11,4 +12,21 @@ const IndexPage = () => {
|
||||||
|
|
||||||
export default 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