@quintype/fastads

1.0.0 • Public • Published

@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>
<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

Parameter Value Example Mandatory?
data-dfp Ad Unit Id 3849069/Large_Leaderboard yes
data-dfp-sizes Sizes for the Ad (must be the same as specified in DFP) [[970,90],[728,90],[320,100],[320,50]] yes
data-dfp-sizemapping Viewport 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

Readme

Keywords

none

Package Sidebar

Install

npm i @quintype/fastads

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

8.05 kB

Total Files

7

Last publish

Collaborators

  • arunabhthakur94
  • vishwanath.reddy
  • nandakishore
  • ritesh-singh-quintype
  • rahul.joseph
  • himani39
  • veena.yemmiganur
  • jeevan_kishore
  • devops-quintype
  • sharangj
  • athira001
  • srajesh636
  • sivteck
  • shraddha_kesari
  • bindiya
  • ags1773
  • deokumarjnu
  • qtpravin
  • reena07111996
  • nikithanadig
  • harshie46
  • mauliksharma
  • raghavendra.vaidya
  • snitin8994
  • sarvabharan
  • rakshi059
  • enkrypt
  • shriramethiraj
  • g_madhuparna
  • phaneendraandukuri