This repo is based on the great job done by eBay and Antoine Jac
react-prebid-rp
A JavaScript library for ad placements with Prebid with Demand Manager to facilitate header bidding in React applications.
Integrate ads in your app the “React way”: by adding ad components to your JSX layout!
Prerequisites
To use react-prebid-rp
, you need to have a Doubleclick for Publishers
(DFP) ad server set up, along with a Magnite Demand Manager Prebid wrapper in place. Please refer to the Prebid documentation and the Magnite Demand Manager documentation for more details.
Overview
This GitHub repository is the source for the npm module react-prebid-rp. It contains the core react-prebid-rp
module, as well as a demo-app
using create-react-app) to run functional tests.
Using the GitHub Repository
Firstly you will need to install the dependencies for both the React component and the demo-app:
-
npm install
to install components dependencies -
npm run demo-app:install
will install dependencies to the demo-app
Then you need to build the component and push it into the demo-app:
-
npm run dist
will build the component and copy it to demo-app > node_modules -
npm run demo-app:start
will run react demo-app on 3001 port
You can then run automation tests in two different ways:
-
npm run test-component
will run puppeteer tests using demo-app with current component's build version -
docker-compose -f docker-compose.tests.yml run component-tests
will run automation tests using Docker locally
React Implementation Guide
- Please see the implementation guide within the Magnite Resource Centre
License
Copyright © 2021 magnite.com