next-google-adsense 3.0.1
Install from the command line:
Learn more about npm packages
$ npm install @eisberg-labs/next-google-adsense@3.0.1
Install via package.json:
"@eisberg-labs/next-google-adsense": "3.0.1"
About this version
NextJS React Component for Google Adsense.
npm i --save @eisberg-labs/next-google-adsense
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 block:
import {Adblock} from "@eisberg-labs/next-google-adsense";
export default function Page() {
return (
<>
<Adsense client_id="myClientId"/>
<Adblock className="adsbygoogle block"
data-ad-client="..."
data-ad-slot="..."
data-ad-format="auto"
data-full-width-responsive="true"/>
</>);
}
MIT © Eisberg Labs
Details
- next-google-adsense
-
eisberg-labs
- over 2 years ago
- MIT
- 6 dependencies
Assets
- next-google-adsense-3.0.1.tgz
Download activity
- Total downloads 1
- Last 30 days 0
- Last week 0
- Today 0