Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.87 KB

README.md

File metadata and controls

73 lines (50 loc) · 1.87 KB

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.