WordPress.org

Ready to get started?Download WordPress

Forums

Ad Code Manager
[resolved] Setup for Novice DFP Users? (5 posts)

  1. ssryan
    Member
    Posted 2 years ago #

    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/

  2. Jeremy Felt
    Member
    Plugin Author

    Posted 2 years ago #

    For a very detailed start, your 2 best references are going to be the other notes section on the plugin page, which helps explain what needs to be configured, and the example gist, 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.

  3. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

    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 . 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:Automattic/Ad-Code-Manager.git[/code]

    Please let me know if any of my muttering didn't make sense :)

  4. ssryan
    Member
    Posted 2 years ago #

    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!

  5. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Sweet, marking this as resolved

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic