Simple tip: fading hit counter
Although I wanted hit counters on some of my iWeb pages, I didn't want them to be so . . . blah, so bold, so obvious. Two wee little tips:
1. To have a hit counter on the page but invisible to guests, simply place a shape object on top of it, matched to the color of the background. It'll be there but nobody will be able to see it.
2. To have your hit counter appear faded or dim, place a shape object on top of it, matched to the color of the background, and set the shape object's translucency to <100% to achieve the desired effect.
Now nobody can say I never contributed anything to the forum.
That's a good trick. Thanks for the tip. When you get tired of hiding the Apple counter, you should take a look at Statcounter.com. You can configure this counter to blend in or complement the colors of your page, change the font or the number of digits, and change the size. You can even make the StatCounter counter completely invisible but functional. And you can set it to not count your own visits to your website. Best of all, all of your counters can be tracked easily via a StatCounter Dashboard widget! No more checking the .Mac Homepage just for your hits...just hit F12.
Similar Messages
-
I need Java code for a simple graphical hit counter for a webpage
I was wondering if anybody out there could send me some code for a simple graphical hit counter for a webpage. All the sites that I've visited are garbage and of no use to me. Please help me.
ColinNot as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
- Applets can't read/write files
- Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
In short, no, there is no simple java solution (that I know of).
Cheers,
Radish21 -
Hit counter, hyperlink appearance, fetch questions
Hi. New to Mac/Iweb. Hope you don't mind a compound question -
I rebuilt my site recently using Iweb (www.joshbass.com), and for the most part, like it very much. However, there are a couple things I'm lost on. My settings tell me that on my hyperlinks, they're supposed to be white when "normal", and turn red on rollover. However, I have three browsers right now, IE, Firefox, and Safari, and only in Firefox do they behave correctly. In the other two browsers they simply stay white when rolled over.
Secondly, I wanted to put a hit counter in (I believe there's no other way to measure traffic with this program, right?), but I'm NOT using .mac. So I found a random free counter, pasted the code into a web widget, and in Iweb it looked fine. Once published, not so much. Doesn't show up at all. Tried all the browsers, no difference.
Third, I was wondering if there's a simple way to tie Fetch (for FTP) to Iweb, so that as I update the site in Iweb, I can publish only the changes, instead of FTPing the entire site's contents. There are indeed directions in the Iweb help files, but I'm afraid of doing something dumb and publishing garbage.
Thanks.hi derek,
1) the hit counter is a .mac only feature! you need to get an alternative counter such as statcounter:
http://karreth.com/iweb/How%20To%20Add%20A%20StatCounter.html
2)yes - check these instructions
http://www.rowan-cottage.co.uk/Site/Autoplay_Music.html
3)no sure what you mean with "automatically"
4)my favorite is cyberduck. i also ahve some instructions for it:
http://karreth.com/iweb/Host%20To%20Other%20Than%20.Mac.html
max -
Please advise of any tutorial or example of a web visit counter.
I can create one that increments the count for each visit and refresh but really need something that will count unique visitors.
Maybe use a session but not sure how to do it.Depending on whether this is a casual hit counter, or something more mission-critical, there's a number of ways to accomplish this.
One option is to increment the counter, then place a cookie on the user's computer. If the cookie is present, don't increment the counter again. Set the cookie to never expire, or expire after a certain window of time (after which the user would be considered "unique" again). Only drawback to this is if the user clears their cookies, then returns, the counter would consider them unique no matter what. Second, you could store each visit as a row in a database, along with the user's IP address and a date/time stamp. Your code could then query that table based on the IP address, and only increment the counter if that IP address is not present. Depending on how long you want to consider a user "unique", you could filter the rows by date. Keep in mind that this could result in a large table, depending on your traffic, so it may be best to have some sort of cut-off time after which you would delete records.
You could even combine the two methods, if you so desire.
I'm sure there are many other ways this can be accomplished, but these are two simple means to accomplish your goal. -
I've got a nice hit counter built with help from these
forums. It's working beautifully. Now I'm building the web stats
page. (no I'm just using CF7 and don't have CFStat from CF8 yet) I
would like to display the total count for the month (which I've
got) and then the daily breakdowns with the count for each day. I
know there's got to be a dynamic way to set the queries up to do
this without building 30 queries or more. I also want it to be able
to continue through the years without me having to modify the
dates.
Right now my simple query looks like this.
<cfquery datasource="#dsn#" name="sept">
select referer, date from website_hits
where page like '%home.cfm'
and date >= '09/01/08'
and date <= '09/30/08'
</cfquery>
and the output is correct with
<cfoutput>#sept.recourdcount#</cfoutput>
But I know this is not good coding. I must be overwhelmed or
in a brain fog. Any thoughts?
Thanks, WendyMaybe I should be more specific. I got the monthly total
query working using this
<cfset today = #Dateformat(Now(), "mm/dd/yy")#>
<cfset daytostart= #DateAdd("d",-thedatepart,today)#>
<cfset daytostart = daytostart +1>
<cfset daytostart = #DateFormat(daytostart,
"MM/DD/YY")#>
<cfquery datasource="#dsn#" name="monthly">
select referer, date from website_hits
where page like '%home.cfm'
and date >= '#daytostart#'
and date <= '#DateFormat(now(), "mm/dd/yy")#'
</cfquery>
<cfoutput>#monthly.recordcount#</cfoutput>
<br>
But now I need to pull out the daily totals. I'm toying with
the query below. I'm assuming I need to loop this and be able to
increment the date where it's currently hard coded. Is there a way
to loop this and assign each date to a variable that I can use to
display in a table?
<cfquery datasource="#dsn#" name="thefirst">
select date from website_hits
where page like '%home.cfm'
and date = '09/01/08'
</cfquery> -
What can replace the hit counter - preferably one without ads - an html code?
I'm looking for some html code for a hit counter to replace the one from iweb.
The free sources all have ads associated with them.Statcounter is kind of overkill for most websites much like Google Analytics.
You will get a link to a whole bunch of simple hit counters on this page...
http://www.iwebformusicians.com/Search-Engine-Optimization/Statistics.html
Am I the only person on the planet that uses the web server stats like Webalizer? No code required and even I can make sense of them! -
how to add simple hit conter in flex???
In php succesflly loadded the hit conter its working but i want to know how to add external variables in-to flex?....
<?php
//Opening file to get counter value
$fp = fopen ("counter.txt", "r");
$count_number = fread ($fp, filesize ("counter.txt"));
fclose($fp);
?>
<html>
<head>
<title>Counter number</title>
</head>
<body>
<center>
<?php
$i="";
$ImgPath="imgs/"; //Path of image folder
$counter = (int)($count_number) + 1;
$count_number = (string)($counter);
$len = strlen($count_number);
while($len!=$i && $len!=0)
echo "<img src=".$ImgPath.$count_number[$i].".jpg alt=\"You are visitor number $count_number\" width=20 Height=22>";
$i++;
$fp = fopen ("counter.txt", "w");
fwrite ($fp, $count_number);
fclose($fp);
?>
</center>
</body>
</html>
if yo konw please answer me its very urgent....
www.vinoddanims.wordpress.comyou'll have to do an external call to your javascript in the template file, from your flex application.
here's an example of flex<-> javascript communication
http://www.switchonthecode.com/tutorials/flex-javascript-tutorial-simple-interaction
here's an example of how to do a hit counter using PHP instead of Javascript
http://www.mattlefevre.com/viewExample.php?tut=flexPHP&proj=Hit%20Counter -
Proxy Visiting URL and Hit Counter
When i connect and download a url using java it doesnt add one to the javascript hit counter on that site, whats wrong ? here is my code :
import java.util.Properties;
import java.util.Date;
import java.net.URL;
import java.net.URLEncoder;
import java.net.HttpURLConnection;
import java.net.URLConnection;
import java.io.*;
import java.util.*;
// This is a simple example that shows how to get HTTP connections to work
// with a proxy server. If all goes well, we should be able to post some
// data to a public cgi script and get back the resulting HTML. If anyone
// knows some "gotchas" when combining Java and proxies, I'd love to hear
// about them. Send your thoughts to [email protected].
public class RunProxy
static String proxy;
static String port;
static String url;
public RunProxy (String url1, String proxy1, String port1)
proxy = proxy1;
port = port1;
url = url1;
System.out.println ("Proxy Used:");
System.out.println (proxy);
System.out.println ("Port Used:");
System.out.println (port);
System.out.println ("Url Used:");
System.out.println (url);
//proxy = "195.61.75.183";
System.out.println (proxy);
main (new String [0]);
public static void main (String argv [])
try
System.out.println ("Does this come after ? ");
// Enable the properties used for proxy support
System.getProperties ().put ("proxySet", "true");
System.getProperties ().put ("proxyHost", "" + proxy);
System.getProperties ().put ("proxyPort", "" + port);
char doubleBrackets = '"';
Calendar calendar = Calendar.getInstance ();
String seconds = "" + calendar.getTimeInMillis ();
seconds = seconds.substring (0, 10);
// URL to a public cgi script
System.out.println (seconds);
// URL url = new URL ("http://www.outwar.com/page.php?x=889751/&tom=" + seconds + "&tom_ench=d23bb6ce525d19b409977e39a298049e&pro=761b4f72a39bfbbbe7a556fa6cd41aa1&r=&h=25e7ec84cd9a43ff95a7c0393468f582&wid=" + doubleBrackets + "+wid+" + doubleBrackets + "&hit=" + doubleBrackets + "+ hit +");
String url2 = url;
//url2 = "http://missions.itu.int/~italy/old%20files/visitors.htm";
URL url = new URL (url2);
// URL url = new URL ("http://google.ca/");
//URLConnection connection = url.openConnection ();
HttpURLConnection connection = (HttpURLConnection) url.openConnection ();
connection.setFollowRedirects (true);
connection.setInstanceFollowRedirects (true);
connection.setDoInput (true);
connection.setDoOutput (true);
// enter the username and password for the proxy
String password = "vishu:vishwajeet";
// base64 encode the password. You can write your own,
// use a public domain library like
// http://www.innovation.ch/java/HTTPClient/ or use
// the sunw.server.admin.toolkit.security.BASE64Encoder
// class from JavaSoft Java Web Server.
//String encoded = base64Encode( password );
String encodedPassword = "Basic " + new sun.misc.BASE64Encoder
().encode (password.getBytes ());
// Set up the connection so it knows you are sending
// proxy user information
connection.setRequestProperty ("Proxy-Authorization", encodedPassword);
// Set up the connection so you can do read and writes
connection.setDoInput (true);
connection.setDoOutput (true);
/*// open up the output stream of the connection
DataOutputStream output = new DataOutputStream(
connection.getOutputStream() );
// simulate a POST from a web form
String query = "name=" + URLEncoder.encode(
"Ronald D. Kurr" );
query += "&";
query += "email=" + URLEncoder.encode( "[email protected]" );
// write out the data
int queryLength = query.length();
output.writeBytes( query );
output.close();*/
// get ready to read the response from the cgi script
DataInputStream input = new DataInputStream (
connection.getInputStream ());
// read in each character until end-of-stream is detected
try
PrintWriter output = new PrintWriter (new FileWriter ("tempPage2.txt"));
for (int c = input.read () ; c != -1 ; c = input.read ())
output.print ((char) c);
input.close ();
output.close ();
catch (Exception heea)
System.out.println (heea);
System.out.println ("UR GOOD!, next run. ");
//suicide
catch (Exception e)
System.out.println ("Something bad just happened.");
System.out.println (e);
e.printStackTrace ();if your going through a proxy your gonna be hitting the server with the same ip address each time right? Don't some/most counters count unique IP address hits?
-
I just set a simple counter to track hits on multiple pages (4 to be exact) using a fairly simple Coldfusion code. Now, maybe I am crazy, but my issue occurs when (this is surely questionable) the adsense code is present on the page!? Simply put, it acts weird all the time, adding +2 or +3 instead of +1?
here is the code:
<cfparam name="URL.ID" default="1">
<cfquery name="updateHits" datasource="mydatasource">
UPDATE table
SET TOTALHITS = TOTALHITS + 1
WHERE ID = <cfqueryparam value="#URL.ID#" cfsqltype="cf_sql_clob" maxlength="75">
</cfquery>
what seems to be the problem? should I use cffunction perhaps, on the page or in cfc?
I am running CF MX7.Various distinct pages could send the same url.id to the server, for example,
page1.cfm?id=1
page2.cfm?id=1
page3.cfm?id=1
and so on. Hence, it isn't yet clear to me why you use url.id to count page hits.
Owain has already hinted at a more reasonable solution. The page count is performed in onRequestStart in Application.cfc.
Create a table, say pageHit, with columns id(autoincrement int), pathFromRoot(varchar), hits(int). You could, for example, already insert all the possicle CFM pages of your site into the pageHit table, giving each an initial hits count of 0.
Here is an example to illustrate. My sample site has just 2 CFM pages. The paths are relative to the webroot.
pageHit (database table)
id = 1
pathFromRoot = /testDir/page1.cfm
hits = 0
id = 2
pathFromRoot = /testDir/page2.cfm
hits = 0
The calculation for the page hits is:
<cffunction name="onRequestStart">
<cfargument name = "targetPage" type="String" required="true">
<cfset var detectPage = queryNew("","")>
<cfset var countPage = queryNew("","")>
<!--- identify current page --->
<cfquery name="detectPage" datasource="my_dsn">
select id
from pageHit
where path = '#arguments.targetPage#'
</cfquery>
<!--- update number of hits --->
<cfif detectPage.recordcount GT 0>
<cfquery name="countPage" datasource="my_dsn">
update pageHit
set hits = hits + 1
where id = #detectPage.id#
</cfquery>
</cfif>
</cffunction> -
Need help, I would like to add visitor hit counter to my web
page, I have done some searching and have found may service that
will count for you but I would prefer to insert the code. I found
some JavaScript code but it only counts the number of times I have
been into the site, I want to count every hit to the home page and
since I am new to all of this I need some simple code, any ideas?
Thanks
LJWHello LGW,
First off I would recommend that you stay away from having a
page count icon
on your website. Visitors to your website really don't care
how many other
visitors preceded them and most are savvy enough now to know
that these page
counts mean very little anyway since they count every hit
from every source.
Also, having a page count displayed on your website
unfortunately screams
amateur. It pretty much ranks up there with the running dog
animated image,
or the old blink tag.
On the other hand it is extremely important to know how many
visitors are
coming to your site where they come from and how effective
your site might
be by engaging visitors and keeping them on your site. Simply
counting hits
can't do this. Fortunately most web hosts make some sort of
stats engine
available to their customers. Check with your Web host to see
if they offer
this feature and if so how to access this information. If
they don't offer
this feature I would recommend finding a host that does
because most good
commercial hosts offer a very robust stats engine for their
customers. You
can also use a service such as Google analytics. The downside
to this
however is like-it-or-not, using this service you end up
sharing a lot of
your personal site traffic information with Google and in the
agreement he
signed to use these services you are basically giving Google
permission to
use this information however they wish. If this doesn't
bother you then
Google analytics is a great service, but I prefer the stats
engines offered
by most votes as this gives you the same information without
an invasion of
your privacy or private data.
Hope this helps.
Lawrence *Adobe Community Expert*
Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF
"lwieskam" <[email protected]> wrote in
message
news:[email protected]...
> Need help, I would like to add visitor hit counter to my
web page, I have
> done
> some searching and have found may service that will
count for you but I
> would
> prefer to insert the code. I found some JavaScript code
but it only
> counts the
> number of times I have been into the site, I want to
count every hit to
> the
> home page and since I am new to all of this I need some
simple code, any
> ideas?
>
> Thanks
> LJW
>
> -
How do I add a hit counter to my website?
How do I go about adding a hit counter to my web site?
I am running Adobe Dreamweaver CS6.Humm.......hit counters are meaningless. They don't provide accurate figures of who has visited your website.
You'd be better off putting Goolge Analytics on the site - that will give you more accurate feedback.
If you want to just have some fun Google Web Counter - there are plenty of free resources where you can download the code needed and insert it into your websites page.
Just grab the code and paste it where you want the counter to show up on your page (not recommended)
http://www.simplehitcounter.com/ -
How do I add a hit counter to my Gallery?
So much I can't find instructions for on this board, in FAQ or in iWeb or iPhoto help.
Anyone know how to add a hit counter to the gallery used when iPhoto publishes pictures?I still have not been able to add a hit counter to my gallery. I have no problem adding them to iWeb pages so it is frustrating that it's not as easy.
-
My counting widget has disappeared from the widget list in iWeb. I deleted it from my page. How do I get it back?
Try using the Insert->Button->Hit Counter menu option. If that fails then you might have to reinstall iWeb from the disk it came on. To do so you'll have to delete the current application and all files with "iWeb" in the file name that reside in the HD/Library/Receipts folder. Reinstall iWeb and apply the latest updaters.
OT -
Hi,
Is there any way we can track the hit count for a particular folder in KM?
Is there any particular default event where we can listen for this?
Helps will be appreciated...
Regards
BPHi BP
This is the most recent information om KM statistics by Thilo Brandt:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0
I don't know if it is possible, but I'd guess it's possible to alter that code in order to get some statistics on folder-level as well as item-level.
Kind regards,
Martin Søgaard -
Hit Counter For Web Site Now Working?
I have a web site that was published with iWeb 06. I am using a domain name at GoDaddy and forwarding to .Mac using masking so the site shows with the domain name not the .Mac address. If you went to the site by entering the domain name the hit counter on the first page would not show. However, if you entered the .Mac address to go to the site the counter would show.
Well the site was republished and upgraded with iWeb 08. Recently I noticed that the hit counter now shows regardless of how you go to the site. I was pleasantly surprised but when did this happen? Of course as others have noticed, on my .Mac home page on the side bar where the website pages are listed the counter numbers no longer show. So they took something away and gave something back?
JohnI don't think Apple meant to take away the .Mac counter section of the .Mac page. I think it's a bug that they have yet to resolve. It would be interesting to see if anyone has asked Apple about this and if they gave a definitive answer?
Maybe you are looking for
-
Add new photo to existing calendar folder in iPhoto I am making a calendar in iPhoto, picking photos from a folder, let's call it "2011 Pics," in iPhoto. After arranging all the photos and captions I decided I wanted to insert a new photo -- one that
-
Hi All, I have a requirement with free of charge functionality. It needs to be possible to assign free products retroactively for a certain time period and calculate the number of free products by the number of products ordered in the given period.
-
Creative Cloud subscription ask for serial number
I have purchased Creative Cloud subscrption and it ask serial number from where do I locate the serial number for Creative Cloud.
-
Installed new hard drive, can't install OSX - help!
I just installed a new 500GB hard drive in my 2008 late model unibody MacBook (not pro). I inserted the original OSX install disk (snow leopard, I think), but the disk isn't recognized. The screens white, with a blinking gray folder icon with a quest
-
Delete photo in iCloud photo stream?
Hi, is there a way to delete an individual photo in photo stream in your IOS 5 device?