Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category Page Views from Static Pages

Quote Reply
Category Page Views from Static Pages
Hi-

I'm wondering if it's possible to put some type of javascript (or other script) on my category pages that would update a new MySQL Category Stats table when a given static category page is viewed. In other words, if someone comes to my directory and goes to Category Number One static HTML page, then the script would be activated when the page loads, and would insert a row into the MySQL Category Stats table with the specific category info (Category ID Number, Category Full Name), and the date and time the row was inserted. I don't want to use dynamic pages, because I get much better traffic from search engines when I build the static pages.

Does anyone know if something like this is even possible?

--FrankM
Quote Reply
Re: [FrankM] Category Page Views from Static Pages In reply to
You could do this using SSI.

1) rename your pages to index.shtml
2) write a script that does what you want
3) put <!--#include virtual="/path/to/script.cgi"-->

Or you could put a (blank) image on the page (no SSI required):

1) write script that outputs the (blank) image
2) call image through <img src="/path/to/script.cgi">

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Category Page Views from Static Pages In reply to
Thanks very much Ivan. Smile I think I'll pursue the option with the blank image calling a script. I just wanted to make sure something like this was possible.

--Frank
Quote Reply
Re: [FrankM] Category Page Views from Static Pages In reply to
Here's a link for producing a very small gif image in your perl script:

http://www.perlmonks.com/index.pl?node_id=7974

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Category Page Views from Static Pages In reply to
Fantastic! Thanks again Ivan, you just saved me a lot of time in searching for an example of an image script.

--Frank
Quote Reply
Re: [FrankM] Category Page Views from Static Pages In reply to
Your welcome.

I use this myself, and it works like a charm.

Ivan
-----
Iyengar Yoga Resources / GT Plugins