Coder Social home page Coder Social logo

thedrum-developers / the-drum-dfp-bundle Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 1.37 MB

Adds support for configuring and rendering DFP ad units in a Symfony project

PHP 62.69% JavaScript 21.86% HTML 15.44%
symfony dfp doubleclick-for-publishers

the-drum-dfp-bundle's Introduction

The Drum DFP Bundle

SensioLabsInsight


Adds support for configuring and rendering DFP ad units in a Symfony project

Installation

Install the bundle

composer require thedrum-developers/the-drum-dfp-bundle dev-master

Install the assets

bin/console assets:install --symlink

Configuration

Add the appropriate configuration for your ads i.e.

the_drum_dfp:
    network_id: **NETWORK_ID**
    domain: **DOMAIN NAME**
    positions:
        mpu_dh_1:
            screen_sizes: []
            ad_sizes: [[300, 600], [300,250]]
            dom_name: DFP_mpu_dh_1
            slot_name: **DFP_AD_MPU_SLOTNAME**
            position_name: mpu_dh_1
        leaderboard_header:
            screen_sizes: [[0,0], [728,90]]
            ad_sizes: [[], [728, 90]]
            dom_name: **DFP_AD_LEADERBOARD_SLOT_NAME**
            slot_name: CAMPAIGN1_728x90
            position_name: leaderboard_header

Add ad placeholder divs into the markup

i.e. <div id="DFP_mpu_dh_1"></div>

Include the following before the closing tag

{{ the_drum_dfp_render() }}
<script async src="/bundles/thedrumdfp/js/dfp.js"></script>

Activate Ads

Set the_drum_dfp.active is set to true in app/config/parameters.yml

License

This bundle is under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

When reporting a bug, it may be a good idea to reproduce it in a basic project built using the Symfony Standard Edition to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.

the-drum-dfp-bundle's People

Contributors

anthonyptetlow avatar chrisshennan avatar

Watchers

 avatar  avatar  avatar  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.