Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 480 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 480 Bytes

Google Ad React Component

Installation

npm i --save react-google-ad

Then in your HTML include:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

Usage

import GoogleAd from 'react-google-ad'
<GoogleAd client="xxx" slot="xxx" format="xxx" />

Arguments

  • client: the data-ad-client provided by Google
  • slot: the data-ad-slot provided by Google
  • format: the data-ad-format provided by Google