Giter Site home page Giter Site logo

dfploader's Introduction

DFPLoader

A Angular Module, Which helps integrating DFP on your site using a config file. Config Based DFP ad code loading, Just define the ad units id, target and size and you are good to go.

Defination

The config takes

  • api : (URL) : Defination of Adunits
  • singleRequest : (boolean) : DFP Single Request
  • data : (array) : Array of Adunits
  • no_fill: (function) : Function to be invoked when ad throws no_fill
  • on_fill: (function) : Function to be invoked when ad is rendered

Adunit Array should have object with "id", "size", "target"

  • id : (string) : The DFP Adunit id, from your Ad network panel.
  • size : (array) : The sizes of Adunit in case of multi ad unit it will be array of array
  • target : (string) : The dom element Id which needs to be targeted.

Usage

In case of calling through API call

DFP.init({api : "config.json"});

In case of defining Inline

DFP.init({data: [{"id" : "/1234/travel/asia/food","size" : [[728,90],[970,90]],"target" : "ad_unit_728x90"},{"id" : "/1234/travel/asia/food","size" : [[320,250]],"target" : "ad_unit_320x50"}]});

dfploader's People

Contributors

saurabhguptag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.