# React GPT
A React component for Google Publisher Tags.
Requirements
Browser Requirements
Features
- Supports all rendering mode(single request mode, async rendering node and *sync rendering mode)
- Supports responsive ads.
- Supports interstitial ads.
- Supports lazy render.
* Synchronous rendering requires that the GPT JavaScript be loaded synchronously.
Installation
$ npm install --save react-gpt
Getting Started
Import React GPT and pass props to the component.
import {Bling as GPT} from "react-gpt";
class Application extends React.Component {
render() {
return (
<GPT
adUnitPath="/4595/nfl.test.open"
slotSize={[728, 90]}
/>
);
}
}
To run examples:
- Clone this repo
- Run
npm install
- Run
npm run examples
for client side rendering, npm start
for server side rendering. - Point your browser to http://localhost:8080
Contributing to this project
Please take a moment to review the guidelines for contributing.
License
MIT