Hi,
I have followed the instructions provided, checked and rechecked but for some reason I can't seem to get the Google ads to display. Running Drupal 5

I have an active Admanager account. With active ad slots. I have installed the drupal Admanager module. Input my current admanager account number as well as the active ad slot names. I then set the blocks in which these ad slots would serve ads. So all seems to be in place.

However I seem to be getting an error in firebug "GA_googleFillSlot is not defined". When I look into it further, the javascript inside the header does not seem to be getting included. However if I manually include this script then the ads are served without issue.

Any ideas what it is I am doing wrong?

Thanks in advance.

Comments

bossmanthe’s picture

And I included the code into my template.php file

if (module_exists('google_admanager')) {
$vars['scripts'] .= google_admanager_add_js();
}

toemaz’s picture

Is it possible that $vars['scripts'] is overwritten somewhere?

What you could do:
* add print_r($vars['scripts']); after the $vars['scripts'] .= google_admanager_add_js(); line
* add print_r($vars['scripts']); in page.tpl.php file, just before it is being printed
Compare these two.

One last thing which I don't know will make a difference: did you include the code inside template.php
yourtheme_preprocess_page(&$vars) function?

toemaz’s picture

Status: Active » Postponed (maintainer needs more info)

Could you give me more info. If not, I will close this issue.

mewren’s picture

Reminder: make sure Ad Blocker / Ad Blocker Plus is not running. Try it in IE to see if it works there.

kiranp’s picture

I ran into the same problem.
Solution could vary from theme to theme, but here is here's what i did:
1. removed the code from yourtheme_preprocess_page(&$vars)

2. Added this:
function _phptemplate_variables($hook, $vars = array()) {
....
if (module_exists('google_admanager')) {
$vars['scripts'] .= google_admanager_add_js();
}
....

3. Make sure a "Region" is specified for the "Ad Slot: " Block.

@bossmanthe
I saw javascript errors just like you did, when "Region" for the Block was set to None.

jcisio’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

5.x versions are not supported, except for security issues.