isamrish / gatsby-plugin-google-adsense

A Gatsby plugin to easily add a google adsense to your gatsby site
https://www.npmjs.com/package/@isamrish/gatsby-plugin-google-adsense
MIT License
11 stars 5 forks source link

Snipped was not injected #1

Closed tw1t611 closed 4 years ago

tw1t611 commented 5 years ago

Hi,

I tried the default option and head: true with the latest gatsby version, but the snipped was not injected. Could you check, if it's working for you?

plugins:

  plugins: [
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    `gatsby-theme-material-ui`,
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `src/images/icon.png`, // This path is relative to the root of the site.
      },
    },
    `gatsby-plugin-offline`,
  ],

Furthermore I edited gatsby-browser.js

import Amplify from "aws-amplify"
import { AppProvider } from "./src/components/app-context"
import React from "react"
import aws_exports from "./src/aws-exports"

export const wrapRootElement = ({ element }) => {
  Amplify.configure(aws_exports)

  return <AppProvider>{element}</AppProvider>
}
isamrish commented 4 years ago

Hi @tw1t611 , there was typos in usage. I have updated it. You can try now.