Statsasonic Help: [1] Userprofile Settings
When you log into your account, you'll find a tab 'userprofile'. That's the place where you can change all basic settings of your account. You'll find a checkbox 'visible'. This is the global switch for all counter images/text on your whole site. If you uncheck this, you won't be able to make your counter visible at any place. Default is checked and most of you probably better keep it checked. Below you'll find a pulldown-menu that contains TrueType-fonts. These fonts are used for your counter image creation. Other counter scripts often use premade images and you only got a choice between a limited number of styles. - Not at Statsasonic! At Statsasonic you can choose your own TrueType fonts for your counter image. Below you'll find two color-palettes. The first one sets the foreground color, the color of the letters. The second one sets the background-color. If you check the 'transparent background'-checkbox, your background color will be transparent. Still you should set a matching background-color to make your counter image look smoothly.
On the left side of the color-palettes you'll find an input-field that accepts all three kind of color-notations:
plain-text: blue
RGB: 00+00+255
Hexadecimal: #0000FF
Don't forget the insert the '+' if you use RGB format and don't forget to enter '#' before a hexadecimal string.
By clicking on 'Save configuration' your result will be displayed on the bottom (sample image).
[2] Statsasonic.js - Visitor Tracking
In order to track your visitors, you need to upload statsasonic.js to your server. This file transfers all the visitor's data to Statsasonic which could be located on another machine that supports PHP. We are not going to explain how exactly this file acts but we want to make clear how to use it to make your counter visible. Default is set to invisible. No matter if you checked 'visible' in your userprofile or not! The checkbox 'visible' in your userprofile is just kind of a global switch that turns off all visibility. The visibility still has to be set on each page where you want it to show up! We're going to use the following two variables: showme = 'y|n' and st = 'js|img'.
st stands for "show-type" and specifies the way how your visitors should get tracked. showme is the local switch for visibility.
valid values for the st variable:
st='js' for text output (DEFAULT)
st='img' for image output
If you wish to make your counter visible, you need to set showme = 'y'
showme='n' invisible (DEFAULT)
showme='y' visible
Ok, basically your Statsasonic code that you insert on each page, looks like this:
<script language="JavaScript" type="text/javascript" src="statsasonic.js"></script> <noscript><img alt="" src="http://www.statsasonic.com/statsasonic.php ?id=your_username&st=img"></noscript>
As default is showme = 'n' and st = 'js', your counter would be completely invisible. In order to change mode insert another line before those two lines:
<script>showme='y'; st='js'</script>
<script language="JavaScript" type="text/javascript" src="statsasonic.js"></script> <noscript><img alt="" src=" http://www.statsasonic.com/statsasonic.php?id=your_username&st=img"></noscript>
This example would make your counter visible and show it as text. Same thing with image-output, just change the st variable to 'img' - then you'll be able to see the nice image you have created in you userprofile.
I do not recommend to use the combination st='y'; showme='n' as this would output a 1x1 pixel image. It's cleaner to handle invisibility through the 'js'-output = empty string!
[3] Showhits.php
Above you found a description of how to make the counter visible on your page. Let's say you put the Statsasonic-code in the footer of your pages and you wish to display it somewhere else on your page... or let's say you would like to show the number of people currently online or the number of hits of the current day.
showhits.php can do a lot!
Its purpose is just to display different information and not to track visitors. showhits.php will not alter anything in the database.
There are 3 different ways to display showhits.php:
st='js' for text output (DEFAULT)
st='img' for image output
The appropriate usage for those 3 modes are:
JavaScript [st = 'js']:
<script language="JavaScript" type="text/javascript" src=" http://www.statsasonic.com/showhits.php?id=username&st=js"></script>
Image-tag [st = 'img']:
<img alt="" src=" http://www.statsasonic.com/showhits.php?id=username&st=img">
The variable showme has no meaning in showhits.php - it is always set to 'y'. If you would not like to make it visible, you wouldn't call this script, right?! This script is only meant to display stuff, that's why it is always visible.
There's a couple of more things that showhits.php can display. It can output today's hits, today's page impressions, this month's hits/page impressions, current online users, amount of customers, total page impressions, etc.
For, you just need to add another variable the code that has been described above: type
----------------------------------------------------------------------------
type= hits | pageviews | today | todayviews | yesterday | yesterdayhits |
month | monthviews | onlineusr | customers | mpdl
mpdl= /your_url
description:
hits: shows total hits (default)
pageviews: shows total pageimpressions
today: shows today's hits
todayviews: shows today's pageimpressions
yesterday: shows yesterday's hits
yesterdayviews: shows yesterday's pageimpressions
month: shows current month's hits
monthviews: shows current month's pageimpressions
onlineusr: shows current online users
customers: shows amount of activated useraccounts
----------------------------------------------------------------------------
Let's make an example: You wish to display the current online users as text in your page:
JavaScript [st = 'js']:
<script language="JavaScript" type="text/javascript" src=" http://www.statsasonic.com/showhits.php ?id=username&st=js&type=onlineusr"></script>
[4] URL handling
Dynamic web sites: A URL can be structured into the following components: <scheme>://<user>@<host>:<port>/<path>?<query>#<fragment>
Usually people do not want to store the whole URL into Statsasonic's logging table. In the multi-page list we do not want to make any difference between URLs with various different query-strings. e.g. abc.php?f=4&i=2136&t=2066 should be handled the same as abc.php or abc.php?f=4&i=2000&t=2015. Usually we don't want to store the whole URL including the whole query-string.
Now, let's say you're using a dynamically built site that is just made of one single page. e.g. we only got list.php and the actual content of this page gets generated out of the information located in the query-part of the URL. That's where we actually need to distinguish between URLs with various different query-strings.
At this point we're using the "short query" user setting. Each user can specify his own query-strings that he wish to get logged. He has to enter the query-strings into the textbox, each separated by a newline.
Example:
http://www.abc.com/abc.php?date=200111& s=d46df4e47043bfab5d08fee9d24e0146&threadid=100&page=news
short query:
------------
| date |
| page |
------------
Result:
-------
http://www.abc.com/abc.php?date=200111&page=news
By specifying "date" and "page" we're able to cut the query-string down to those two values and stripping off all the other stuff. e.g. we don't need to store the session-ID (s=d46df4e47043bfab5d08fee9d24e0146).
If we enter a "*" as short query string, then nothing will be stripped off and Statsasonic will keep the whole query-string.
http://www.abc.com/abc.php? date=200111&s=d46df4e47043bfab5d08fee9d24e0146&threadid=100&page=news
short query:
------------
| * |
------------
result:
-------
http://www.abc.com/abc.php? date=200111&s=d46df4e47043bfab5d08fee9d24e0146&threadid=100&page=news
As default, the "short query"-string is empty. That way Statsasonic would strip off the whole query string.
index.* --> /
This list is for those who would like to handle "index.*" as "/".
Enter all index.* into this setting box, separated by newlines, e.g.:
---------------
| index.html |
| index.php |
| index.phtml |
---------------
|