Web page visit - hit counter

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.

Similar Messages

  • Web stats for hit counter

    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, Wendy

    Maybe 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>

  • Hit Counter button not appearing when I upload the web site.

    I am using iWeb version 3.0.4 on OS 10.6.8, and on the Welcome page, I added the Hit Counter button.  When I upload the web site, the Hit Counter button does not appear.  Anyone have any solutions as to why it isn't appearing?  Thanks...
    Peggy Hinsman
    Eugene School District 4j
    Eugene, Oregon

    Where are you hosting the site? The counter will not work on ftp servers, only on MobileMe.  If you are hosting on MobileMe increase the footer height considerable and publish. If the counter then appears you can move it closer to the body/footer border and reduce the footer height.
    If you're not on MobileMe consider a 3rd party counter like StatCounter.  This tutorial describes how to add it to iWeb pages: #13 - Adding a StatCounter as an HTML Snippet
    If you're on MobileMe you know that MMe will be discontinued on June 30 of next year.  This may be of interest: #23 - Life After MobileMe
    OT

  • 2nd Hit Counter on Site not showing up on different page

    I am so close to being done with my Illustration website- 11 pages and only one last bug I can't figure out. I have a second Welcome page that I have hidden and not yet posted. I have no idea where the the hit counter is on the page, it is checked off as there- it doesn't load online or visible on iWeb, yet Insert/button has it as there. I have another hit counter on the site that works fine. I have saved, relaunched, no hit counter on this page. Deleted it, tried again and no luck.
    Here is the site:
    http://web.mac.com/yvette
    The page that I am working on but is not in the menu:
    http://web.mac.com/yvette/iWeb/Site%204/Welcome.html
    The hyperlink works fine but no hit counter.
    Thanks-
    Y

    no hit counter on this page
    The hit counter is in the footer area, but you set the page content height too short, set content height longer or move hit counter out of the footer and into body area.
    One other little issue- On my Menu, the "Fantasy" link doesn't let you use the Fanatsy section at the top of the page. It is one of 11 pages, all connect fine, this one is at the upper most right top
    I think it is block by this image: http://web.mac.com/yvette/iWeb/Site%204/Menufiles/shapeimage9.png
    You need to send it backward.

  • Hit Counter not appearing.

    OK I'm using iWeb, the URL is at Godaddy, but the hosting is at my /mac account. I have the family pac. Two web sites the hit counter works just fine. A third one I got it to work on a page where I don't need it, but can't get it to SHOW on the page where I want it. I've tried to put it anywhere on the page, and have restarted etc etc. Suggestions?

    what is the purpose of your link? hit counter? or pushing wares?
    there are only links on your page, people can google 'hit counter'...
    ... at least, you should show an example of what looks like iweb hit counter.
    here is bling: http://www.cyclosaurus.com/Home/Cyclosaurus.html
    (to the left) it looks like iweb hit counter, but it is a StatCounter.

  • Improper Spacing on the Hit Counter

    On this page on my website, the hit counter (at the bottom of the page) is not where it should be; in iWeb, it's about 40 pixels below where the horizontal rule (line) is. But when Safari renders the page, the hit counter ends up waaaay down below, about 300 pixels further than it should be.
    Could iWeb be giving the object an 'absolute' position, and the text size screws up how far down the page the text goes? I can't quite figure it out...
    In Firefox, the hit counter renders above the horizontal line. Is there any way I can put the hit counter inline with the text? (I'd rather not have to manually code the html each time I want to make a small change to the web page, and re-publish it...).

    Here's an easy fix...
    Open up iWeb to this page in question. Open up the Inspector panel, click on the Page tab. What you need to do is to adjust the values for Content Height and Footer. It's easier if you also go to the View menu and select "Show Layout" so that you can see exactly where the boundary of the content and footer are. Adjust the Content Height so that it actually fits your content. I think for your page, the default values are waaaay too short. Keep adjusting the value up until you see the bounding line of the layout actually start to move beyond your content. This threshold is the correct value for Content Height.
    As for the footer....is your counter part of the body content or is it part of the footer??? One option is to make it part of the footer if you like by Apple-dragging it into the footer (you will see the footer borders highlight on the drag). Then adjust the footer size so that it just fits the amount of vertical height you need to encompass the counter. The other option is to leave your counter as part of the body content...adjust the Content Height appropriately. Then adjust the footer to zero. Republish. Problem should be solved with none of the variability between browsers, too.
    If you find this information useful, please take the time to provide me with feedback by marking my reply as "solved" or "helpful" using those little buttons that you see in the title bar of this reply. I'd really appreciate it!

  • Can I create a web page without .Mac Account?

    Hi all,
    Quick question: Is there any way to create a gallery for the web using iPhoto if you don't want or have a .Mac account? I have my own domain and hosting and I'd like to simply have iPhoto build the site, which I can upload to my own server.
    I've found no information on this possibility and I suspect that it doesn't really fit into Apple's, uh.. non-freemarket business plan.
    Any ideas? Thanks in advance!

    Hi newworld border,
    You sure can! Select the photos/album and go to Share>export
    In the export window there is a web page button
    hit that and set your options.
    there is also a plugin for iPhoto called BetterHTMLExport for iPhoto on Mac OS X
    This plugin gives you more choices for your web creation.

  • Create PDF from Web Page Using URL List

    Hello
    I have a list of 100+ URLs which I would like to convert into PDF's
    I currently need to open each web page and hit the convert button
    Is there a way to automate the process. (For example can I import the list of URL's into Acrobat) and have Acrobat convert all the urls into PDF
    Thank you

    JohnnyNobody wrote:
    S.D.A.
    Your response did not show up, could you please repeat
    Thanks
    Sure, (e-mail responses aren't working good I'm afraid).
    What I said; was that I don't know of a 'pont 'n click' way of doing this, It can be done programmtically.
    Might not be what you want to hear though.

  • What the blood clot is up wit Safari and SAVIN web pages..

    i'm pretty fed up...it shouldn't be this difficult..
    i don't have interent at home so its mad vital on this..
    i'll go to my friends or family house surf the web...and whatnot...then i try to save for later viewing...
    i'm going to a web page and hitting save as.. selecting save as web archive complete...
    but when i get home... and with airport turned off.. i go reopen thsese saved archives and it doesn't save correctly...the page comes up but no images come up...
    ex. i'm on a video game forum and i save as complete web archive
    when i get home and try to show my wife my post with images.. ONLY the text comes up and little square boxes wit a ? on it instead of images..
    waht am i doing wrong?
    a year ago when i got the mac it worked fine.. but now..
    is there a program or differnt web browser i should use to avoid these problems? ( i wnat to stick wit apple tho)...
    and another thing my time clock is gone as well how i get that back..
    thank you all and i hope you can help me!!
    good day!
    opNe

    can no one help?
    oNe

  • Can I create a web page in Contribute with restricted access?

    We use Contribute to edit and update our property website.  I would like to create a page that will display on the website but only to those that have the login and password to look at it.  Can I do that?

    Hi newworld border,
    You sure can! Select the photos/album and go to Share>export
    In the export window there is a web page button
    hit that and set your options.
    there is also a plugin for iPhoto called BetterHTMLExport for iPhoto on Mac OS X
    This plugin gives you more choices for your web creation.

  • When trying to cler all browsing history at the location bar, although I follow the instructions to 'ctrl, shift, delete, some web pages remain stuck. Even if I highlight them one at a time and hit delete, they remain. What can I do to eliminate them?

    When trying to delete web pages from my history at the location bar drop-down area, I do as Firefox instructs by hitting the 'ctrl, shift, delete' keys but some web pages remain. Even if I highlight each page and hit delete, they remain. How can I eliminate these web pages?

    If you visit a bookmarked site then that site will become a history item and shows as such in the location bar drop down list.

  • 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?
    John

    I 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?

  • Get hit count of a page or a dashboard (usage tracking)

    hi, experts, I found that I can get the query count (using count(*)) from usage tracking.
    but is it possible to get the hit count on a particular tab page or on a particular dashboard? not the query count on a page or a dashboard.
    thank you very much!

    Hi Nicolae,
    I did some digging and I found a few things out.
    Point 1) The OBIEE .dll files are what build up the HTML files based on their code and some "customizable" code in the XML files located in the messages folder of OBIEE (C:\OracleBI\web\msgdb\messages). I say "customizable" with quotes because although these files are editable, it is not supported by Oracle and any upgrade will overwrite your changes. That being said, we cannot change the code in the dll files, so our only other option is to play with the XML files and see if we can inject our script somewhere in their code.
    Point 2) The absolute last message from an XML file is the message that wrote the div with id="idSelsPermissionsDlgDiv". I had to do some grep'ing but I located the file which generated the final DIV. It is the commonuitemplates.xml file line 161. The bad thing is that the particular WebMessage is called multiple times ( I think three times based on my tests) in the building of the HTML. So if you put the code here, it would show up three different times in your HTML. Not ideal :(
    Point 3) The dashboardtemplates.xml document, line 410 is executed about four lines before the final body tag. This WebMessage is only executed once, so it is the closest you can get to the bottom of the page without having a duplicate entry. I recommend you paste the code from google right before the final html tag on line 410.
    Hope this helps!
    -Joe

  • Realtime web hits counter

    design question:
    1. A web site has 20000+ web pages/url's.
    2. at peak time, 8000+ concurrent users are visiting.
    3. 20+ pages are mostly hit concurrently.
    How can a counter track and report the hits accurately in real time(or semi real time) without sacrifice performance?
    1. synchronized can satisfy the accurate part, but will block threads and thus impact performance.
    2. can this problem be solved gracefully without using JMS?
    3. when multi threads put messages to one JMS Queue, only one thread at a time can put and other threads has to wait. is this correct?
    Thanks.

    [java.util.concurrent.AtomicLong.|http://java.sun.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicLong.html]

  • .Mac front page hit counts list

    Using iWeb with .Mac, I get hit counts only for the top 5 pages in my .Mac front page status column. I assume that's a standard and have found no settings to permit me to change this.
    Is this it? Can we only monitor the counts for our top 5 pages without having to actually visit (and influence the counts of) the other pages?
    If I'm missing something, I'd be grateful for a friendly hint on how to passively observe the hit totals on all marked pages. If this is just the nature of the beast, chalk it up as another straw in the growing pile under the sign labeled "frustrating shortcomings."

    That's the way it's been since the Homepage days too. I'm not aware of any other way to show the "hits" for more than just the top 5.

Maybe you are looking for

  • How do I make a PDF read only in Pro 9 extended

    Hello, I created a document in Adobe presenter and published a PDF file. I'm using the file in a LearninIg Management System where students can take courses online. I want the student to be able to open the PDF in the browser without the save or prin

  • Multiple front panels

    My problem VI consists of a Main UI where the operator can initiate tests. The tests are sub-vi's and I only need one of those active at a time.  However, there are some general routines that I have together in another sub-vi called from the Main UI.

  • Cannot find an email to issue a customer complaint.

    I have been a longtime Verizon customer. I purchased an Iphone 5 on October 2012. In April of 2013 I got a job that provided me with an IPhone 5, so I downgraded my Verizon line and gave my Iphone 5 away. In December of 2013 my position was eliminate

  • Wont charge and push data

    how do you push data? update it or whatever? it won't charge. i plugged it in and it made the sound that is plugged into the usb. then the battery icon shows it as it is charging. i leave and come back only to find it still says 10% battery left and

  • Why are static methods called with null references,valid ?

    This is my code : package inheritance; public class inh6{      public static void method(){      System.out.println("Called");      public static void main(String[] args){           inh6 t4 = null;      t4.method(); O/P : CalledHere t4 is a null refe