How can I get AdMob to work on my mobile website?

161 views
Skip to first unread message

Jeremy P

unread,
Mar 31, 2011, 6:31:49 PM3/31/11
to Google AdMob Ads Developers
I am having major issues with getting AdMob to work on my mobile
website. I did as I was supposed to and set up the appropriate
JavaScript attributes (I am using the smartphone version). However,
when my site runs, no ads display and I get the following error in the
error console:

" Error: admob_vars is not defined
Source File: http://mmv.admob.com/static/iphone/iadmob.js
Line: 1"

If anybody has enough experience to know how to get the ads working, I
would greatly appreciate your feedback. And please, do NOT point me to
AdMob's development wiki. I tried following it, and it is written like
utter crap.

Here is my site:

http://www.jeremyrperry.com/mobile/oldcarvsnewcarcalcmob.html

Rory Lydon

unread,
Apr 1, 2011, 1:46:10 AM4/1/11
to google-adm...@googlegroups.com
Hey Jeremy.

Sorry, this is the wrong forum as it's for app developers...

Thanks!

loupiote

unread,
Apr 2, 2011, 3:10:40 AM4/2/11
to Google AdMob Ads Developers
yeah, but that's the only help forum mentioned on the "AdMob for
iPhone" page http://developer.admob.com/wiki/IPhone - and this page
also covers using the AdMob asynchronous ajax code on websites.

is there any other forum that covers "AdMob for iPhone" (
http://developer.admob.com/wiki/IPhone )?

loupiote

unread,
Apr 2, 2011, 3:14:11 AM4/2/11
to Google AdMob Ads Developers
i see:

<script type="text/javascript" src="http://mmv.admob.com/static/iphone/
iadmob.js"></script>

</head>
<body onload="initializePage();">

<script type="text/javascript">
var admob_vars = {
pubid: 'a14d91b6d31d1e2', // publisher id
test: false, // test mode, set to false if non-test mode
manual_mode: true
};
</script>


i.e. your page defines admob_vars AFTER you load the iphone/iadmob.js
script.

you should define admob_vars BEFORE loading the script, as explained
on this page: http://developer.admob.com/wiki/IPhone
Reply all
Reply to author
Forward
0 new messages