Socket
Socket
Sign inDemoInstall

@eisberg-labs/next-google-adsense

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @eisberg-labs/next-google-adsense

NextJS React Component for Google Adsense.


Version published
Weekly downloads
13
increased by30%
Maintainers
1
Install size
7.45 kB
Created
Weekly downloads
 

Changelog

Source

4.0.2 (2023-01-25)

Bug Fixes

  • next-image-section: fix not applied css (e14e13d)

Readme

Source

Downloads

Next Google Adsense

NextJS React Component for Google Adsense.

Installation

npm i --save @eisberg-labs/next-google-adsense

Usage

Follow the instructions on Google Adsense and create ads.txt in the public directory. Format of ads.txt should be something like:
google.com, pub-0000000, DIRECT, 00000000
If you just want to run autoads, adding <Adsense client_id="..."> on your page should be enough:

export default function Page(){
    return (
        <>
          <Adsense client_id="myClientId"/>
        </>
    )
}

To include an ad unit:

import {AdUnit} from "@eisberg-labs/next-google-adsense";

export default function Page() {
  return (
    <>
      <Adsense client_id="myClientId"/>
      <AdUnit className="adsbygoogle block"
                data-ad-client="..."
                data-ad-slot="..."
                data-ad-format="auto"
                data-full-width-responsive="true"/>
      </>);
}

License

MIT © Eisberg Labs

Keywords

FAQs

Last updated on 25 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc