XF 1.3 DFP forum category targeting

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.
 
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.
 
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.

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.webp


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

Rich (BB 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
 
@Clickfinity Thank you. There is a caveat though. When you go to set up the creative, you are left with this:
gIrmXjf.png

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.
 
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"?
 
@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 :/
 
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.
 
Back
Top Bottom