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
Comment #1
bossmanthe commentedAnd I included the code into my template.php file
if (module_exists('google_admanager')) {
$vars['scripts'] .= google_admanager_add_js();
}
Comment #2
toemaz commentedIs 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?
Comment #3
toemaz commentedCould you give me more info. If not, I will close this issue.
Comment #4
mewren commentedReminder: make sure Ad Blocker / Ad Blocker Plus is not running. Try it in IE to see if it works there.
Comment #5
kiranp commentedI 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.
Comment #6
jcisio commented5.x versions are not supported, except for security issues.