Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-11 00:11:21

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

hit_logger and hit_viewer plugins v0.9.04 alpha version available!

edit: There’s a new version available!

<pre>Consider this “alpha testing” – I’m interested in thoughts on the code
as well as bugs and feature requests. All data that’s captured using this
version will be deleted when you upgrade to a future version.</pre>

Features

  • 404 errors get forwarded to a web address you’ve specified, by default your homepage, but could be another site or a specific section on your site. This requires Textpattern version 4.0.1.
  • What’s captured is configurable. For speed reasons, several things can be turned off – like DNS lookup, and looking up browser/os/etc (which require a database hit). I’ve concentrated on speeding up hit_logger, the code that logs the hits.
  • To get rid of clutter on the list of hits on hit_viewer, things like search engines and spiders can be removed from view. Viewing hits isn’t as optimized as logging them, I concentrated more on features.
  • If your website visitor previously used a comment form and filled in a name, they’re considered a “friend” and their name can be displayed instead of an IP address or something that was looked up using DNS. Not sure if this works since I have comments disabled on all of my Textpattern sites.
  • Auto config of the database. It’s pretty solid, even allows uninstalling/totally removing the tables I’ve added. The upgrade possibilities are also built in for future versions. It’s also extremely robust when only one of the two plugins is installed.
  • Works alongside the standard Textpattern logging (you can turn off the original logging to speed things up). Can also be disabled with an option on the Textpattern preferences tab. Combined with the previous feature, it’s unobtrusive and easy to remove.
  • Flags show the type of link and can be clicked to hide that type of link. For example, there’s a question mark next to a search engine hit – click and they’re not displayed. The header of that column turns into a link to reenable viewing search engine hits.
  • Full pagination of the hits that have been recorded along with variable viewing sizes. Just like standard Textpattern screens.
  • Detailed view displays things like duplicate hits, your hits, and number of 404s. Also shows the top sections and articles. Also shows search phrases and search words. Also shows percentage of browser/os/spider hits to the site. In other words it shows a bunch of stuff.

Thanks to all those that have tested earlier version, you might want to upgrade to get a few minor fixes.

Of course more information is available on my site and you can download the plugins from there as well.

[Lee]

Last edited by LeeStewart (2005-09-15 23:10:44)


Monkeys could have written a better post..

Offline

#2 2005-09-11 17:52:35

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

This is absolutely beautiful. Works great! Thank you so much for this plugin.

p.s. Have you any plans of incorpoating Country hits based on the visitors Country/Region?


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#3 2005-09-11 23:07:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

Nice work Lee. I noticed it can see pre-plugin logs now – the latest one I had couldn’t see them before, for some reason. Sorry I didn’t respond to your emails, but I’ve been busy busy busy. :)

Regarding translation you asked about, unless/until we get a built-in way for plugins to do it, its still fairly easy to still make your plugin translatable. Steal from any of most of my plugins and you can see how I did it, I just made my own mini version of gTxt for each plugin that needs it. I know for certain that both upm_img_popper and upm_file_packets have it.

Offline

#4 2005-09-12 06:36:41

shishira
Member
From: Bangalore India
Registered: 2005-04-17
Posts: 62
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

The logger rocks

Offline

#5 2005-09-12 15:05:47

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

creativesplash wrote:
This is absolutely beautiful. Works great! Thank you so much for this plugin.

Glad you like it!

p.s. Have you any plans of incorpoating Country hits based on the visitors Country/Region?

I planned on this having all of the functionality of a professional hit tracking tool, including this feature. The problem has been the size of my plugin, which has grown into two plugins (and it looks like there might be a third!).

Let me know if you see any problems!

[Lee]


Monkeys could have written a better post..

Offline

#6 2005-09-12 15:41:25

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

I just installed your plugin and it looks great. I have nevertheless have a question on a functionality I do not understand (or is it that it is malfunctioning?) In the Admin/logs subtab the url with which the referrer is linked looks like:

http://www.neme.org/main/textpattern/index.php?event=log&step=log_forward_hit&referring_host=hblack.net&referring_uri=%2Fhblack%2Findex.php%3Fid%3D96

On clicking it, I end up in a textpattern empty(ish) screen containing just the txp logo, the pull down menu and the log out link.
I would expect that link to go to the referrers url…

>edit
here’s another one from this forum
http://www.neme.org/main/textpattern/index.php?event=log&step=log_forward_hit&referring_host=forum.textpattern.com&referring_uri=%2Fviewtopic.php%3Fid%3D11237
it loads the forum but not the page or css…

Last edited by colak (2005-09-12 15:55:38)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2005-09-12 16:15:09

schussat
Plugin Author
Registered: 2004-02-24
Posts: 101
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

Lee, this is really cool. Thank you!


-Alan

Offline

#8 2005-09-12 17:09:12

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

colak wrote:
I just installed your plugin and it looks great. I have nevertheless have a question on a functionality I do not understand (or is it that it is malfunctioning?)

That would be a bit of “malfunctionality”, sorry.

Normally, the referrer would be a standard link back to the calling page. In my hopped-up “let’s make every square inch of this thing better” world, it’s a little different. The problem with a standard link is that you leave a hit on the other site and they’re now linked back to something like “http://www.neme.org/main/textpattern/index.php?event=log”. They’ll click and see the Textpattern login screen.

Who needs that? I wrote some code to forward log hits in a way that it looks like the hit came from your home page. Now when they click in their referrers, they don’t have to figure out that the Textpattern “view site” tab is the best way to see the page and they don’t have to edit down the URL in the browser and try again.

Note that I’ve seen sites where the hit counter link from the other person even has the PHP session id of the site owner, so I could click back and be logged in as the administrator!

Anyway, that code will probably never make it into the production plugin – it’s not very reliable. It requires opening a socket to the remote, spoofing some HTTP headers, and requesting the page. It makes the browser think the page is on your site (which breaks relative links to CSS or image files) and doesn’t work for all servers. Overall it’s just not a robust solution and I don’t think it’s worth the effort to polish up.

It definitely isn’t supposed to be in the 0.9.04 release.

You have several options:

  1. Edit the code to remove this. You can search hit_viewer for where I set up $referprint and remove the line that uses etLink() and use the standard link just below that.
  2. Wait for the next release, which will probably be Thursday. I might release sooner if I hear about some huge problems, but I don’t think that’ll be the case.
  3. Don’t click that.

Seriously, though – thanks for finding that!

[Lee]


Monkeys could have written a better post..

Offline

#9 2005-09-12 18:36:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

Thanks Lee,
I’ll wait till Thursday or whenever you release the fix/next version.

A few feature requests… (I’m just thinking aloud here:)

It would be great if some more stats are displayed in “view details” ie…
1. average hits/day
2. hits in the past week (ie Mon 200hits, Tue 300hits etc)
3. hits/month
4. Average hits/weekday
5. Average hits/month
6. Total Hits/Year
7. Have you any plans of incorporating Country hits based on the visitors Country (creativesplash’s suggestion)
8. Unique hits (ie maybe with the use of a cookie expirable/day or per browser relaunch or whatever)

Last edited by colak (2005-09-12 18:38:26)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2005-09-12 19:46:25

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

colak wrote:
A few feature requests… (I’m just thinking aloud here:)

Numbers 1-6 are coded and I’m testing them before the next release. I just need a full weeks worth of hits to test everything out (I should collect a full month, but who’s got that kind of time?). You can see more about 0.9.05 on the the “Up Next” section of the documentation page (click the “More…” button to see everything.

7. Have you any plans of incorporating Country hits based on the visitors Country (creativesplash’s suggestion)

I’ll try to get it in there, like I said the database code is getting rather large. I have an idea how to get around a few things and compress stuff, etc – I’ll put that in 0.9.07.

8. Unique hits (ie maybe with the use of a cookie expirable/day or per browser relaunch or whatever)

Right now I track “duplicates”, which is the number of people that have hit your page more than once. I’ll change that to “unique visitors” and show the appropriate number (my details screen shows 2434 total hits with 511 duplicate hits, meaning 1923 unique hits). Easy enough to change the wording and display on the Details Screen.

Neat feature: I called it “duplicate” because the “Log View” lists them with little ‘+’ symbols. If you have “log_advanced_view” turned on, you’ll see the length of time the person viewed the previous page when you hover over the plus sign.

[Lee]


Monkeys could have written a better post..

Offline

#11 2005-09-12 20:11:55

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

i guess i’m the only one who couldn’t get this working. i’ll try later again.

Offline

#12 2005-09-13 02:31:07

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: hit_logger and hit_viewer plugins v0.9.04 alpha version available!

Thanx for your reply. You’re right. You have to watch out for the size of the plugin. I would suggest that you have all the extra goodies like OS’s, Browsers, Country hits etc.. as one plugin. Installing three plugins are not so bad as long as they do three different things. :)

and … One last request (before its too late): I would be grateful to you if you include Browser Resolution logs of Visitors.

Regards,
Vasanth


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

Board footer

Powered by FluxBB