Google Admanager Integration

MobileHacks

New Member
Google Admanager Integration

This integration lets you target all relevant parts of your forum within google admanager:
  • usergroup
  • script
  • forum (optional)
If there is more interest, I'll provide a product for easier integration.

1. Google Admanager > Inventory > Targeting

Targeting Key: usergroup
Code:
1
2
3
4
5
6

Targeting Key: script
Code:
index
showthread
forumdisplay

Targeting Key: f1 (optional)
put here all forumids from your highest forum level
Code:
1
Targeting Key: f2 (optional)
put here all forumids from your second highes forum level
Code:
22
23

Targeting Key: f3 (optional)
put here all forumids from your third highest forum level
Code:
44
Originally Posted by example forum board
forumid 1 General discussion
--- forumid 22 Discussion about forums
--- forumid 23 Discussion about vbulletin
--------- forumid 44 Discussion about products
You'll want to fetch these forumids with mysql if you have lots of forums.


2. template headinclude
Add this to the end of template and change red markings with your own information:


PHP:
<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
  GS_googleAddAdSenseService("YOUR CA-PUB");
  GS_googleEnableAllServices();
</script>
<script language="JavaScript">
  GA_googleAddAttr("usergroup", "$bbuserinfo[usergroupid]");
</script> 
<script language="JavaScript">
  GA_googleAddAttr("script", "<if condition="THIS_SCRIPT =='index'">index</if><if condition="THIS_SCRIPT =='forumdisplay'">forumdisplay</if><if condition="THIS_SCRIPT =='showthread'">showthread</if>");
</script> 
<script language="JavaScript">
  GA_googleAddAttr("f1", "$forumlevel[0]");
</script> 
<script language="JavaScript">
  GA_googleAddAttr("f2", "$forumlevel[1]");
</script> 
<script language="JavaScript">
  GA_googleAddAttr("f3", "$forumlevel[2]");
</script> 
HERE YOU PUT YOUR ADMANAGERS ADDSLOT TAGS
<script type="text/javascript">
  GA_googleFetchAds();
</script>
3. plugin global_start (optional)


PHP:
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
    $forumlevel[] = $forumID;
}
 
Google Admanager Integration

This product targets ads to usergroup, script, forum. That way you can address ads to these targets.
Example: Target all users except moderators in your favorite forums on index and forumdisplay directly in Google Admanager!


  • have a detailed view which usergroups, scripts, forums bring best adsense results. You have a detailed view about all targeting values.
    Example: You see that your announcement forum has a CTR of 8% and an eCPM of 25 $. Unregistered users bring an eCPM of 15 $ while registered users only have an eCPM of 3 $.
By the way a maximum of 6 adsense ads are allowed, when using Google Adsense in combination with Google Admanager.

1. Install product
If you upgrade: Allow Overwrite: Yes

2. Change template headinclude
If you upgrade please also do this. Add to end of this template:
PHP:
<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
  GS_googleAddAdSenseService("YOUR CA-PUB");
  GS_googleEnableAllServices();
</script>
<script language="JavaScript">
  GA_googleAddAttr("usergroup", "$bbuserinfo[usergroupid]");
  GA_googleAddAttr("script", "<if condition="THIS_SCRIPT =='index'">index</if><if condition="THIS_SCRIPT =='forumdisplay'">forumdisplay</if><if condition="THIS_SCRIPT =='showthread'">showthread</if>");
$admanagerforums
</script> 
YOUR ADDSLOTS
<script type="text/javascript">
  GA_googleFetchAds();
</script>

3. Google Admanager Configuration

Configure Admanager

Version History
9.11.2008 1.2 Solved a bug for forum targeting
8.11.2008 1.1 Improved forum targeting. Forums are shown with real names. Unlimited forum levels supported.
1.11.2008 1.0 Forums are targeted by using forumids. 3 forum levels supported.

Works with vbulletin 3.5, 3.6, 3.7, 3.8. This product works perfectly with vbSEO. This product doesn't make the vBulletin 3.8 implementation of Adsense work with admanager.
 
Back
Top