Jump to content
Sign in to follow this  
chrisyates

Adding Web Stat Code to all pages?

Recommended Posts

chrisyates

I was wondering how to add web stat code to all my pages. I've tried to add it to the custom code area within WP but no luck. If I add it in either the 'Header Scripts' or Footer Scripts and Analytics' sections and then save I get taken to a page of my website which shows an 'Error 404 - Not Found' page. The code I am trying to add is this: <!-- Begin Web-Stat code 2.0 http --> <script type="text/javascript" src="http://server4.web-stat.com/wtslog.pl?al207003,3"></script> <noscript><p> <img src="http://server4.web-stat.com/3/al207003.gif" style="border:0px;" alt="traffic analysis"/></p></noscript> <!-- End Web-Stat code v 2.0 -->

Share this post


Link to post
Share on other sites
cmunns

Try putting it in the body of your site. You can add it to the header.php file after the `` Let me know if that helps

Share this post


Link to post
Share on other sites
chrisyates

Unfortunately no luck. Everytime I add the code and then click on 'Update File' I get another 404 error. Any other ideas?

Share this post


Link to post
Share on other sites
chrisyates

So I removed the code and clicked the 'Update File' button again and it still takes me to a 404 error page? The strange thing is my site still seems to works fine. I decided to have a quick look through the header.php file and the only thing I can see that looks strange are the question marks as follows: <!-- This makes the comment box appear where the ?????????reply to this comment????????? link is -->

Share this post


Link to post
Share on other sites
Andrew

Which theme and version are you on? This should e-a-s-y in the pro themes; (custom code option)

Share this post


Link to post
Share on other sites
chrisyates

Yeah I thought it was going to be straight forward too! I'm using iBlogPro 3.

Share this post


Link to post
Share on other sites
chrisyates

So I tried adding the simplified code in the custom code option and the page saves fine. It would seem that it has issues with JavaScript. The code I mentioned earlier in the post is obviously JS and it doesn't like it at all. The new code I tried was this: ` web statistics ` The thing is I want to use the JS code as it gives me more options, any other ideas on how I might implement the JS code. Thanks

Share this post


Link to post
Share on other sites
cmunns

can you try linking an external JS file or does it have to be embedded directly in there?

Share this post


Link to post
Share on other sites
chrisyates

I think it needs to be embedded directly. As a test I decided to try adding Adsense code as this is also JS and I have seen it done before in right handside widgets on other iBlog sites. I simply added a text widget to the right and pasted the Adsense code into it and tried to save. I again experienced the same problem of a 404 error?! As soon as I remove the code and save I don't get the error. Am I doing something wrong as others are quite happily adding their JS code on the right without problems?

Share this post


Link to post
Share on other sites
cmunns

Well if you get a 404 it means that the file in question doesn't exist or can't be found. Maybe the javascript is adding code to the permalink that is screwing things up like filepath. Is it possible the code your pasting is bad. There is no reason why adsense wouldn't work especially if you've seen it on other sites. Also, make sure the widget you pasted the code into has a title. Try viewing the source of a page that you know works to see the code they have and reference it to yours for markup differences.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×