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

there two gatsby-plugin-google-adsense in npmjs #2

Closed ghost closed 4 years ago

ghost commented 4 years ago

hi, there. I like your gatsby-plugin-google-adsense, but there another in npmjs.

when I try Install it as $ npm install -S gatsby-plugin-disqus , Actually, I install this one https://www.npmjs.com/package/gatsby-plugin-google-adsense. it has been deprecated.

Then ,I try @isamrish/gatsby-plugin-google-adsense and add the plugin to gatsby-config.js like this

  resolve: `@isamrish/gatsby-plugin-google-adsense`,

  options: {

    googleAdClientId: "ca-pub-XXXXXXXXX",

    head: true // Optional

  }

}

I found google tracking code in, but adsense still dose not work.

is the error in gatsby-ssr.js ?

<script

   key={`gatsby-plugin-google-adsense`}

   ......

my site is iNote

isamrish commented 4 years ago

@xiyizhou - it should work. Can you try again with updated version? Or try with head: false.