Print Page | Close Window

V 9.70 Ad Code error message.

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29082
Printed Date: 01 April 2026 at 5:38pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: V 9.70 Ad Code error message.
Posted By: mAce
Subject: V 9.70 Ad Code error message.
Date Posted: 25 January 2011 at 8:20pm
We just had the upgrade, very slick.

I'm getting an error when updating the include. Here's what i'm doing and the error from Chrome.


'Enter your ad code below for ads shown in the forum header
strForumHeaderAd = "<script type=""text/javascript"" src=""http://syndication.webwiz.net/pagead/?L=wffh""><script type="text/javascript"><!--
google_ad_client = "ca-pub-0104799003429195";
/* SF HEADER */
google_ad_slot = "3078781356";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></script>"


Error message:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/forum/includes/ads_inc.asp, line 53

strForumHeaderAd = "<script type="text/javascript"><!--
----------------------------------^
Am I doing something wrong?
Any help welcome,

Si
Scarletfever Forum



Replies:
Posted By: WebWiz-Bruce
Date Posted: 26 January 2011 at 10:48am
You need to replace the present code in the variable with your own add code. This also needs to be in a format that ASP can read.

The correct code for what you require is below:-

'Enter your ad code below for ads shown in the forum header
strForumHeaderAd = "google_ad_client = ""ca-pub-0104799003429195"";" & _
vbCrLf & "/* SF HEADER */" & _
vbCrLf & "google_ad_slot = ""3078781356"";" & _
vbCrLf & "google_ad_width = 728;" & _
vbCrLf & "google_ad_height = 90;" & _
vbCrLf & "//-->" & _
vbCrLf & "</script>" & _
vbCrLf & "<script type=""text/javascript""" & _
vbCrLf & "src=""http://pagead2.googlesyndication.com/pagead/show_ads.js"">" & _
vbCrLf & "</script></script>"


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mAce
Date Posted: 26 January 2011 at 7:21pm
Thanks Bruce, it's all up and earning. I did have to tweak the code slightly.


Posted By: mAce
Date Posted: 07 February 2011 at 8:01pm
I'm running google adsense on my forum and the ads that are in the include don't seem to be registering on my account. I also have one ad hard coded into the header.asp, which is registering perfectly. When i view source the ads appear to be identically formatted.

I'd like to try hard coding the ads that are not registering in their current positions, but can't seem to find which file and where they are included. Any pointers welcome. 

I would also like to use alternative ads for the mobile version, but I'll walk before i can run.




Posted By: 123Simples
Date Posted: 07 February 2011 at 8:12pm
mAce

An answer will be here tomorrow
I thought however you had to edit includes/google_adsense_inc.asp


-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design


Posted By: 123Simples
Date Posted: 07 February 2011 at 8:14pm
Obviously you also need to be running the  http://www.webwiz.net/web-wiz-forums/forum-compare-editions.htm" rel="nofollow - http://www.webwiz.net/web-wiz-forums/forum-compare-editions.htm  - Premium edition

-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design


Posted By: mAce
Date Posted: 07 February 2011 at 8:32pm
Thanks, I'm displaying the ads fine. I have each on a separate custom channel and they are registering zero impressions. 


Posted By: 123Simples
Date Posted: 07 February 2011 at 8:36pm
There could be several reasons for this:

Your visitors are using adblock software so the ads are never shown

Adsense can't find any ads that fit your site and is showing public service advertising

Your Adsense code is not being loaded either because it is incorrectly applied to your website or the page stops loading before it gets to that code

Users have JavaScript turned off

You can contact Google in their Adsense support forums. Maybe someone there can help you identify the problem.


-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design


Posted By: mAce
Date Posted: 07 February 2011 at 9:10pm
I will also check the adsense forum, but thought this may aid development. 

Here's some addition info that may narrow down the problem.

Originally posted by MrTWS MrTWS wrote:

There could be several reasons for this:

Your visitors are using adblock software so the ads are never shown
I have another ad on the same page that is unaffected

Adsense can't find any ads that fit your site and is showing public service advertising
The ads are displaying correctly i.e commercial and relevant

Your Adsense code is not being loaded either because it is incorrectly applied to your website or the page stops loading before it gets to that code
When I view source,working ad and non working ad appear to be the same code

Users have JavaScript turned off
I have another ad on the same page that is unaffected

You can contact Google in their Adsense support forums. Maybe someone there can help you identify the problem.


Posted By: mAce
Date Posted: 07 February 2011 at 9:23pm
The google support forum suggests that it's could be caused by Google Analytics, I've made the suggested changes and will wait and see.


Posted By: WebWiz-Bruce
Date Posted: 07 February 2011 at 9:41pm
It can sometime take a few hours for Adsense to update as it does not update in real time.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mAce
Date Posted: 07 February 2011 at 10:42pm
It appears to have done the trick, both 'included' ads are now showing page views. For info, I had attached Analytics tracking to my hard coded ad, this prevented the following ads from reporting to my account. 


Posted By: 123Simples
Date Posted: 08 February 2011 at 12:18pm
Glad it's sorted

-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net