1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 DFP forum category targeting

Discussion in 'Troubleshooting and Problems' started by AzzidReign, Jun 20, 2014.

  1. AzzidReign

    AzzidReign Well-Known Member

    Has anyone done this yet? I can't seem to find anything online for forums, just people asking about Wordpress and people saying it is possible to target a category but never actually walking anyone through it.

    I know I need to use Custom Criteria, but what do I add? What do I define the criteria as (I'm guessing, if it is for my Xbox 360 section, just name it "Xbox 360")? And then what value do I put in?

    For the value, do I use forumnode_id=##? And let's say that is correct, since it will be within a thread of that forum, will DFP be able to recognize that value?

    @digitalpoint - I'm sorry about tagging you like this but I think you may have the most experience with this here.
     
  2. digitalpoint

    digitalpoint Well-Known Member

    Sorry, I don't know anything about DFP, I use DPA. :)
     
    AzzidReign likes this.
  3. AzzidReign

    AzzidReign Well-Known Member

    With DPA, are you able to target specific nodes?
     
  4. digitalpoint

    digitalpoint Well-Known Member

  5. RoldanLT

    RoldanLT Well-Known Member

  6. digitalpoint

    digitalpoint Well-Known Member

    RoldanLT likes this.
  7. AzzidReign

    AzzidReign Well-Known Member

    This thread has 700 views??!?! I guess no one has figured this out yet? I'm working on it...waiting for DFP to update. Hoping I figured it out. If I did, it will be out of sheer luck. I wish the wording on the documentation for this was a little better or more in depth. They just say **** like "make sure your webmaster adds this"...does that mean to the URL? Somewhere IN the code? Hopefully I got lucky and this works.
     
  8. CyclingTribe

    CyclingTribe Well-Known Member

    This is just guesswork because I've not tried it, but I think you need to create a free-form customised targeting point called "forumid" (without the quotes) and with no values - just click save:

    upload_2014-6-21_0-41-55.png


    Then pass the XF node ID into the ad call by including googletag.pubads().setTargeting("forumid", "{$forum.node_id}"); in your head tag (example):

    Code:
    <script type='text/javascript'>
    var googletag = googletag || {};
    googletag.cmd = googletag.cmd || [];
    (function() {
    var gads = document.createElement('script');
    gads.async = true;
    gads.type = 'text/javascript';
    var useSSL = 'https:' == document.location.protocol;
    gads.src = (useSSL ? 'https:' : 'http:') +
    '//www.googletagservices.com/tag/js/gpt.js';
    var node = document.getElementsByTagName('script')[0];
    node.parentNode.insertBefore(gads, node);
    })();
    </script>
    
    <script type='text/javascript'>
    googletag.cmd.push(function() {
    googletag.defineSlot('/992221155/Testunit', [728, 90], 'div-gpt-ad-1403307269971-0').addService(googletag.pubads());
    googletag.pubads().enableSingleRequest();
    googletag.pubads().setTargeting("forumid", "{$forum.node_id}");
    googletag.enableServices();
    });
    </script>
    
    The bit I'm not sure about is whether you need to manually enter a list of node IDs in Customised targeting point for reporting / targetting purposes?

    It might not work like this but hopefully it'll help you get a bit further with it.

    Also maybe PM @kontrabass because I think he does this and may be able to better advise. (y)

    Cheers,
    Shaun :D
     
    AzzidReign likes this.
  9. AzzidReign

    AzzidReign Well-Known Member

    @Clickfinity Thank you. There is a caveat though. When you go to set up the creative, you are left with this:
    [​IMG]
    I can't move forward until I define that for this specific creative so this specific creative only shows up in the specific node I add.
     
  10. AzzidReign

    AzzidReign Well-Known Member

    nvm, it appears I can add the value and click save. I thought there would be an "add" button but I just have to click save when I enter it. So I'm assuming that if I just put the node id # in it, that is what it will look for? So i.e. "411"?
     
  11. AzzidReign

    AzzidReign Well-Known Member

    @Clickfinity I got it working. Now, my only problem with this whole thing is, allowing all the other ads to compete with the one that is targeting just the single section. My only solution I can think of ATM is adding the CC to all the rest of the ads :/
     
    CyclingTribe likes this.
  12. AzzidReign

    AzzidReign Well-Known Member

    Ok, I just figured it all out! I'm super stoked. So here's what I've done. I followed @Clickfinity post and for the one that is targeting just the single node, I added that value to it. The rest of the ads get a * for the value. No need for any sort of if condition like I thought I would need.
     
    CyclingTribe likes this.
  13. CyclingTribe

    CyclingTribe Well-Known Member

    Excellent - glad you got it all sorted. (y)
     
  14. AzzidReign

    AzzidReign Well-Known Member

Share This Page