1.2.0 • Published 6 years ago
@isamrish/gatsby-plugin-google-adsense v1.2.0
Install
npm install @isamrish/gatsby-plugin-google-adsenseor
yarn add @isamrish/gatsby-plugin-google-adsenseUsage in Gatsby website
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `@isamrish/gatsby-plugin-google-adsense`,
options: {
googleAdClientId: "YOUR_GOOGLE_ADSENSE_TRACKING_ID",
head: false // Optional
}
}
]
};Options
googleAdClientId
Here you place your Google Adsense tracking id.
head
Here you can define where to place the tracking script. With head:true it will placed in the header, with head:false it will placed in the body. Default is false.
Google adsense recommends to put script in head tag.