Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quintype/fastads

Package Overview
Dependencies
Maintainers
24
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quintype/fastads

Fast DFP Ads

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
24
Weekly downloads
 
Created
Source

@quintype/fastads

Fastads is a library for fast loading of DFP ads. This library uses MutationObserver to insert ads, and should be compatible with react and jquery.

Usage

  • Add gpt via the default gpt script, or via gtm
<script async="async" src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
  • Copy the contents of dist/fastads.html into a script tag at the top of the body.
<script data-version="@quintype/fastads@1.0.0">// Contents of dist/fastads.js here</script>
  • Wherever you are placing a dfp tag, use the following syntax
<div data-dfp="3849069/Large_Leaderboard" data-dfp-size="[[970,90],[728,90],[320,100],[320,50]]"></div>
  • Please note, the div inserted cannot have an id (as one is generated by fastads)

Parameters

ParameterValueExampleMandatory?
data-dfpAd Unit Id3849069/Large_Leaderboardyes
data-dfp-sizesSizes for the Ad (must be the same as specified in DFP)[[970,90],[728,90],[320,100],[320,50]]yes
data-dfp-sizemappingViewport to size mapping. This accept pairs that are accepted by SizeMappingBuilder[[[1024,768],[970,250]],[[640,480],'fluid'],[[0,0],[[1024,768],[970,250]]]]no

FAQs

Package last updated on 21 Dec 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc