Title: [Plugin: Ad Code Manager] Setup for Novice DFP Users?
Last modified: August 20, 2016

---

# [Plugin: Ad Code Manager] Setup for Novice DFP Users?

 *  Resolved [ssryan](https://wordpress.org/support/users/ssryan/)
 * (@ssryan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/)
 * Hello,
 * Love the idea of the plugin, though the process I feel isn’t incredibly clear
   for DFP newbies. We tried Ad Code Manager for a bit but gave up and are considering
   custom implementation that would just insert ad tags that we have pre-generated
   from DFP into template code via a function. I think the main problem is that 
   we’re not understanding how this all works in relation with DFP, and a general
   ignorance of how to make DFP work with this in the first place since it’s all
   a new system. We just jumped from FM to DFP last week so we are still getting
   up to speed.
 * For instance, we can generate tags for DFP that would go to Google Ad Manager,
   but have no idea what parts of the tags we need to put into Ad Code Manager or
   how placements relate to ad tag IDs.
 * Ideally, we’d like to move into using this plugin but we’re a little daunted 
   because there’s not a lot of ground-level information out there on how to start.
   Would it be possible for someone to chime in and give direction on how this should
   be set up on the DFP side, since there doesn’t seem to be a wealth of information
   out there?
 * Thanks! Any and all help would be immensely appreciated.
 * [http://wordpress.org/extend/plugins/ad-code-manager/](http://wordpress.org/extend/plugins/ad-code-manager/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Jeremy Felt](https://wordpress.org/support/users/jeremyfelt/)
 * (@jeremyfelt)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/#post-2721888)
 * For a very detailed start, your 2 best references are going to be the [other notes section on the plugin page](http://wordpress.org/extend/plugins/ad-code-manager/other_notes/),
   which helps explain what needs to be configured, and the [example gist](https://gist.github.com/2494899),
   which gives a good rundown of the configuration itself. We’re pushing quickly
   towards the next release, which adds more flexibility.
 * I’ll run through some of the basics here, which should get you going down the
   right path. Definitely follow up with any questions that you have and we can 
   fill in the blanks.
 * To display an ad code on your site, you’ll need to use the `acm_tag` action.
 * Adding `<?php do_action( 'acm_tag', 'my-728x90-banner' ); ?>` to a spot in one
   of your theme templates will cause Ad Code Manager to process the `my-728x90-
   banner` tag.
 * Every time you use the `acm_tag` action, an ad code will display in that spot.
 * You can have multiple ads defined so that using `<?php do_action( 'acm_tag', '
   my-300x250-sidebar' ); ?>` displays a different sized ad or one with different
   parameters than `my-728x90-banner`.
 * Before they will work in your `do_action` call, `my-728x90-banner` and `my-300x250-
   sidebar`, must be defined by adding a filter to your theme. Check out the `acm_ad_tag_ids`
   section of the plugin notes for an example.
 * Once the tags have been defined, you’ll also need to add the URL used by your
   DFP configuration. Check out the section for `acm_default_url` in the plugin 
   notes for an example of how `%site_name%`, `%zone1%` and other parameters are
   defined as part of the URL.
 * The URL defined by `acm_default_url` is then used as part of of the `acm_output_html`
   filter. Check out the section for `acm_output_html` in the plugin notes. This
   is where the full HTML for your DFP code can be placed, including Javascript 
   or iframes. The URL specified earlier will automatically replace the `%url%` 
   parameter as this output HTML is parsed by the plugin.
 * And finally, check out the filter for `acm_whitelisted_script_urls` at the bottom
   of the plugin notes. This is required to add the Doubleclick server address that
   you will be using in order to prevent injection from other sources.
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/#post-2721903)
 * The following is addendum to Jeremy’s reply.
 * I assume that you’re referring to new DFP JS API (like DFP for Small Business),
   where you have head section js and then googletag.cmd.push(function() { googletag.
   display() };
 * Unfortunately, v0.1 doesn’t provide you an easy solution for new API unless you
   understand what you’re doing and able to hack around. However, we tried to make
   things easier with upcoming v0.2. It has genuine WP Table List interface, but
   still requires some configuration to work in your case.
 * I recently created personal dfp account. I never touched the new DFP API before
   and had to dig in through manuals. So I created my Ad Units, placed some orders
   and then came up with this proof-of-concept config for DFP for Small Business:
   [https://gist.github.com/2494899](https://gist.github.com/2494899) . There’s 
   a couple of lines that marked as IMPORTANT. First one is your DFP id. The second
   one is regarding to ad tag ids. If you’re familiar with git and feeling brave,
   you might want to check out “develop” branch of our git repo
    [code]git clone
   [git@github.com](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/git@github.com?output_format=md):
   Automattic/Ad-Code-Manager.git[/code]
 * Please let me know if any of my muttering didn’t make sense 🙂
 *  Thread Starter [ssryan](https://wordpress.org/support/users/ssryan/)
 * (@ssryan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/#post-2721942)
 * Aha, that’s probably why it didn’t make a whole lot of sense to me. We are indeed
   on the new DFP JS API. Thanks Rinat and Jeremy for the insight.
 * We’ll pull and try 0.2 locally until we get a final release; it looks like the
   gist you posted does seem like an easy config for it.
 * Thanks so much!
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [14 years ago](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/#post-2722022)
 * Sweet, marking this as resolved

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Ad Code Manager] Setup for Novice DFP Users?’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ad-code-manager_e7705e.svg)
 * [Ad Code Manager](https://wordpress.org/plugins/ad-code-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/ad-code-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-code-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-code-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-code-manager/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-ad-code-manager-setup-for-novice-dfp-users/#post-2722022)
 * Status: resolved