🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@rentpath/react-simple-dfp

Package Overview
Dependencies
Maintainers
14
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rentpath/react-simple-dfp

A simple React component for DFP - DoubleClick for Publishers based on @amobiz/react-simple-dfp.

latest
npmnpm
Version
2.1.3
Version published
Maintainers
14
Created
Source

react-simple-dfp

A simple React component for DFP - DoubleClick for Publishers.

Install

npm install react-simple-dfp

Sample Usage

<Dfp adUnitPath='/6355419/Travel' adSize={[728, 90]} adTargeting={{ test: 'infinitescroll' }}/>

Props

adUnitPath

{string}, required Full path of the ad unit with the network code and unit code.

Example

"/6355419/Travel"

adSize

{array}, required Width and height of the added slot. This is the size that is used in the ad request if no responsive size mapping is provided or the size of the viewport is smaller than the smallest size provided in the mapping.

Example

[728, 90]

adElementId

{string}, optional ID of the DOM element that will contain this ad unit.

Example

"div-gpt-ad-1234567890123-0"

adTargeting

{object}, optional Sets a custom targeting parameter for this slot. Values set here will overwrite targeting parameters set on the service that this slot uses.

Example

{
    "test": "infinitescroll",
    "sport": ["rugby", "rowing"]
}

adStyle

{object}, optional CSS Style for this component.

Example

{
    "padding": "20px",
    "background": "#fff"
}

adCollapse

{bool}, optional Sets whether the slot component should be hidden when there is no ad in the slot. This overrides the service-level settings.

Example

false

onSlotRenderEnded

{func}, optional This event is fired when a slot on the page has finished rendering. The event is fired by the service that rendered the slot. Example: To listen to companion ads, add a listener to the companionAds service, not the pubads service.

onImpressionViewable

{func}, optional This event is fired when an impression becomes viewable, according to the Active View criteria.

Demo

git clone git@github.com:amobiz/react-simple-dfp.git
cd react-simple-dfp
open index.html

Issues

Issues

Releasing

  • Inside the pull request, make sure the semantic version is bumped in package.json
  • After merging the pull request, wait for the GitHub Actions workflow to publish the new package version here.

Note: Collaborators can also draft a release to set off the package publishing workflow.

Similar Projects

License

MIT

Author

Amobiz

Contributors

Keywords

advertising

FAQs

Package last updated on 01 Jul 2021

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