Skip to content

w2-yamaguchi/gatsby-plugin-google-adsense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

36302dd · Jul 27, 2022

History

18 Commits
Jul 27, 2022
May 8, 2021
May 7, 2021
May 7, 2021
May 8, 2021
May 8, 2021
May 7, 2021
May 7, 2021
May 7, 2021
May 7, 2021
May 8, 2021
May 7, 2021
Jul 27, 2022
Jul 27, 2022

Repository files navigation

gatsby-plugin-google-adsense

Add Google Adsense Tag to your Gatsby site.

npm (scoped) npm

Usage

Install the plugin:

npm install @w2-yamaguchi/gatsby-plugin-google-adsense

or

yarn add @w2-yamaguchi/gatsby-plugin-google-adsense

Add it to your gatsby-config.js & configure Your publisher ID(required):

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `@w2-yamaguchi/gatsby-plugin-google-adsense`,
      options: {
        publisherId: "YOUR_GOOGLE_ADSENSE_PUBLISHER_ID", // Required
      },
    },
  ],
};

Configuration

The options are as follows:

Property Type Default Description
publisherId String n/a (required) Your publisher ID. This looks like this: pub-1234567891234567. See here for more information.