Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eisberg-labs/next-google-adsense

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eisberg-labs/next-google-adsense

NextJS React Component for Google Adsense.

  • 4.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 25 Jan 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc