An customizable SilverStripe module for Google DoubleClick for Publishers (DFP).
- SilverStripe Framework 3+
- Recommended way to install this module is via Composer
composer require fractaslabs/silverstripe-google-dfp
- Add to your configuration:
---
name: mygoogledfp
---
GoogleDfpSlotHelper:
enable_in_dev: false # if you wanna test banners in "dev" environment change to true
publisher_id: 12345678 # change to your Google DFP network code
layouts:
Page: # change to your Controller ClassName or leave it Page if you wanna apply banners on SiteTree
div-gpt-ad-123456789012-0: # An exact banner ID from Google DFP system
alias: billboard # human readable banner type, used in template for banner init
adUnitPath: /12345678/ad_unit_code # Full path of the ad unit with the network code and ad unit code.
size: '[[1], [300, 250]]' # An exact size of banner creative
outOfPage: false # if banner is "floater" or "wallpaper" type, change to "true"
- Run ?flush=all to update manifests
- Call your banner like this $GoogleDfpSlotByAlias('billboard') in your template (eg. Page.ss) to render selected banner HTML
- More comprehensive documentation can be found here
- Bugs are tracked on github.com
- See Licence