Client wants a visitor counter

Discussion in 'HTML' started by dorayme, Mar 25, 2008.

  1. dorayme

    dorayme Guest

    I have a client who wants a visitor counter. Please leave it to me to
    persuade this client not to have it visible. But I am all ears on any
    recommended methods.

    --
    dorayme
     
    dorayme, Mar 25, 2008
    #1
    1. Advertising

  2. ..oO(dorayme)

    >I have a client who wants a visitor counter.


    Change the client. SCNR

    >Please leave it to me to
    >persuade this client not to have it visible. But I am all ears on any
    >recommended methods.


    Maybe some server-side scripting to print a random number? That's as
    accurate as a "hit counter".

    Question is why he wants it. If it's just to show other visitors how
    popular his site is, then use the random number method. But if he really
    wants to know about the traffic on the site, get or install a logfile
    analyzer like AWStats. This is the best you can get from the raw server
    logfiles. And this would be information that really matters - a stupid
    hit counter means absolutely nothing and just wastes time and bandwidth.

    HTH
    Micha
     
    Michael Fesser, Mar 25, 2008
    #2
    1. Advertising

  3. dorayme

    Neredbojias Guest

    On 25 Mar 2008, dorayme <> wrote:

    > I have a client who wants a visitor counter. Please leave it to me to
    > persuade this client not to have it visible. But I am all ears on any
    > recommended methods.


    I made a hit counter in php using sessions that seemed to tally unique
    visits to a site fairly well. It was relatively simple though there
    were a few drawbacks. Would something like that interest you?

    --
    Neredbojias
    http://www.neredbojias.com/
    Great sights and sounds
     
    Neredbojias, Mar 25, 2008
    #3
  4. dorayme

    SAZ Guest

    In article <doraymeRidThis-174E99.08541626032008@news-
    vip.optusnet.com.au>, says...
    > I have a client who wants a visitor counter. Please leave it to me to
    > persuade this client not to have it visible. But I am all ears on any
    > recommended methods.
    >
    >


    Just give the client what he wants - he's signing the check. Hide it in
    the corner at the bottom. If you don't do it, somebody else will.
     
    SAZ, Mar 26, 2008
    #4
  5. dorayme

    dorayme Guest

    In article <Xns9A6CA1049B028neredbojiasnano@85.214.90.236>,
    Neredbojias <> wrote:

    > On 25 Mar 2008, dorayme <> wrote:
    >
    > > I have a client who wants a visitor counter. Please leave it to me to
    > > persuade this client not to have it visible. But I am all ears on any
    > > recommended methods.

    >
    > I made a hit counter in php using sessions that seemed to tally unique
    > visits to a site fairly well. It was relatively simple though there
    > were a few drawbacks. Would something like that interest you?


    I guess? I don't much know anything about these things. I have set the
    client up already this morning with an invisible one I found,
    statCounter. I removed some bit of their code that caused invalidity on
    my doc type and we shall see if it suits. Have not heard back from
    client yet. It looks impressive enough. There are probably some trrible
    downsides that I don't know about. I will treat it as an experience to
    be learnt from.

    --
    dorayme
     
    dorayme, Mar 26, 2008
    #5
  6. ..oO(dorayme)

    >I guess? I don't much know anything about these things. I have set the
    >client up already this morning with an invisible one I found,
    >statCounter. I removed some bit of their code that caused invalidity on
    >my doc type and we shall see if it suits. Have not heard back from
    >client yet. It looks impressive enough. There are probably some trrible
    >downsides that I don't know about. I will treat it as an experience to
    >be learnt from.


    IMHO the biggest downsides of external counter services are

    1) it might slow down the page rendering if the browser has to wait for
    a response from the counter server

    2) you give away page view statistics for free to an external company

    Micha
     
    Michael Fesser, Mar 26, 2008
    #6
  7. ..oO(SAZ)

    >In article <doraymeRidThis-174E99.08541626032008@news-
    >vip.optusnet.com.au>, says...
    >> I have a client who wants a visitor counter. Please leave it to me to
    >> persuade this client not to have it visible. But I am all ears on any
    >> recommended methods.

    >
    >Just give the client what he wants - he's signing the check.


    And? The client is not always king. There are rules which even the
    client has to accept.

    Micha
     
    Michael Fesser, Mar 26, 2008
    #7
  8. dorayme

    dorayme Guest

    In article <>,
    SAZ <> wrote:

    > In article <doraymeRidThis-174E99.08541626032008@news-
    > vip.optusnet.com.au>, says...
    > > I have a client who wants a visitor counter. Please leave it to me to
    > > persuade this client not to have it visible. But I am all ears on any
    > > recommended methods.
    > >
    > >

    >
    > Just give the client what he wants - he's signing the check. Hide it in
    > the corner at the bottom. If you don't do it, somebody else will.


    It's ok, I have not been pressed either way on this yet but I suspect
    what is mostly wanted is the stats not the visibility.

    --
    dorayme
     
    dorayme, Mar 26, 2008
    #8
  9. dorayme

    Neredbojias Guest

    On 25 Mar 2008, dorayme <> wrote:

    >> > I have a client who wants a visitor counter. Please leave it to me to
    >> > persuade this client not to have it visible. But I am all ears on any
    >> > recommended methods.

    >>
    >> I made a hit counter in php using sessions that seemed to tally unique
    >> visits to a site fairly well. It was relatively simple though there
    >> were a few drawbacks. Would something like that interest you?

    >
    > I guess? I don't much know anything about these things. I have set the
    > client up already this morning with an invisible one I found,
    > statCounter. I removed some bit of their code that caused invalidity on
    > my doc type and we shall see if it suits. Have not heard back from
    > client yet. It looks impressive enough. There are probably some trrible
    > downsides that I don't know about. I will treat it as an experience to
    > be learnt from.


    Ares dammit! I lost the thing. However, I think there're some rough
    drafts in the drafty archives. Gimme a few hours - or days.

    --
    Neredbojias
    http://www.neredbojias.com/
    Great sights and sounds
     
    Neredbojias, Mar 26, 2008
    #9
  10. dorayme

    Andy Dingley Guest

    On 26 Mar, 00:39, Michael Fesser <> wrote:

    > >Just give the client what he wants - he's signing the check.

    >
    > And? The client is not always king. There are rules which even the
    > client has to accept.


    There are rules that apply to the client - doesn't mean they'll ever
    accept them though.


    Go for log analysis and some client education as to "visits" vs. "page
    refreshes" and the problems of simple embedded <img> counters.
     
    Andy Dingley, Mar 26, 2008
    #10
  11. On Mar 25, 5:54 pm, dorayme <> wrote:
    > I have a client who wants a visitor counter.


    We all know the "right" answer, just talk them out of it.
     
    Travis Newbury, Mar 26, 2008
    #11
  12. dorayme

    Neredbojias Guest

    On 25 Mar 2008, dorayme <> wrote:

    >> > I have a client who wants a visitor counter. Please leave it to me

    to
    >> > persuade this client not to have it visible. But I am all ears on

    any
    >> > recommended methods.

    >>
    >> I made a hit counter in php using sessions that seemed to tally unique
    >> visits to a site fairly well. It was relatively simple though there
    >> were a few drawbacks. Would something like that interest you?

    >
    > I guess? I don't much know anything about these things. I have set the
    > client up already this morning with an invisible one I found,
    > statCounter. I removed some bit of their code that caused invalidity on
    > my doc type and we shall see if it suits. Have not heard back from
    > client yet. It looks impressive enough. There are probably some trrible
    > downsides that I don't know about. I will treat it as an experience to
    > be learnt from.


    Hey, I've used StatCounter in the past and was pretty satisfied with it.
    Only dropped it from my site because I wanted to trim.

    Anyway, regarding what I said before, I can't find an original once-
    online copy, so I'll have to give it to you from snippets and memory.
    Confidence is high.

    The following is php, to be enclosed within the php delimiters. It's
    bare-bones and probably can be "dressed up".


    session_start();
    // Start session.

    if (!$_SESSION['ss']) {
    $fil = "flatfile.txt";
    $filc = trim(file_get_contents($fil));
    $filc++;
    $filc .= "\r\n";
    // Get contents of previously-created flatfile which contains string
    of number of visits. Increment and "restring".
    if (!$ifo = fopen($fil, 'wt')) { fclose($ifo); exit; }
    if (fwrite($ifo, $filc) === FALSE) { fclose($ifo); exit; }
    fclose($ifo);
    // Open flatfile, overwrite, and close.
    $_SESSION['ss'] = "Yowsah";
    // Create session variable preventing repeat of routine during
    session.
    }


    That's basically it. As I said, it's bare-bones and could certainly be
    improved, but it works. One drawback is the flatfile; a busy site might
    not be able to "keep up" with updating it. Another is using sessions
    themselves. -Not conducive to speediness. Statcounter may be the better
    option in your circumstances.

    --
    Neredbojias
    http://www.neredbojias.com/
    Great sights and sounds
     
    Neredbojias, Mar 26, 2008
    #12
  13. dorayme

    dorayme Guest

    In article <Xns9A6D594CD75B2neredbojiasnano@85.214.90.236>,
    Neredbojias <> wrote:

    > On 25 Mar 2008, dorayme <> wrote:
    >
    > >> > I have a client who wants a visitor counter. Please leave it to me

    > to
    > >> > persuade this client not to have it visible. But I am all ears on

    > any
    > >> > recommended methods.
    > >>
    > >> I made a hit counter in php using sessions that seemed to tally unique
    > >> visits to a site fairly well. It was relatively simple though there
    > >> were a few drawbacks. Would something like that interest you?

    ....
    >
    >
    > That's basically it. As I said, it's bare-bones and could certainly be
    > improved, but it works. One drawback is the flatfile; a busy site might
    > not be able to "keep up" with updating it. Another is using sessions
    > themselves. -Not conducive to speediness. Statcounter may be the better
    > option in your circumstances.


    Thanks for going to the trouble Boji. I will experiment with yours soon.
    I settled the matter with my client yesterday and put on an invisible
    statCounter and that was the end of the matter, sort of*. The site gets
    invisible and the client gets to see the stats he wants to see by
    logging in to statCounter.

    Micha raised the issue of privacy. There are two issues here. Obviously
    many companies are not going to be keen on a public exhibition of the
    stats. But, I take it that he meant, the statCounter folk have access to
    it and this is a security hole. I have no knowledge of the danger in
    this, I doubt it would be significant for most companies. What is the
    idea of the risk? That folk can break the usernames and passwords at
    statCounter and get to see the stats? That the statCounter folk will be
    tempted by the devil?



    --------------------------
    * OK... the client did send some apes who came when Jake was out on a
    mission and I got roughed up a bit. But I did not give in! I kept
    screaming at them "NO!" And they kept whispering back "Do as saz said!"
    between their clenched teeth as they used their knuckle dusters to
    penetrate my .04 thou inch skin. But I knew they were pulling their
    punches. The poor dumb things had been instructed not to actually finish
    me off. And I knew why. The client needed me alive to keep his site up.
    I had a scotch and fingered a cigarette but resisted. I wanted a leggy
    dame with a missing husband on her mind to walk in and be rich enough to
    afford me to find him or something... I was bruised and tired. I was
    getting too old for this job.

    --
    dorayme
     
    dorayme, Mar 26, 2008
    #13
  14. dorayme

    SAZ Guest

    In article <>,
    says...
    > .oO(SAZ)
    >
    > >In article <doraymeRidThis-174E99.08541626032008@news-
    > >vip.optusnet.com.au>, says...
    > >> I have a client who wants a visitor counter. Please leave it to me to
    > >> persuade this client not to have it visible. But I am all ears on any
    > >> recommended methods.

    > >
    > >Just give the client what he wants - he's signing the check.

    >
    > And? The client is not always king. There are rules which even the
    > client has to accept.
    >
    > Micha
    >

    I strongly disagree. I will play devil's advocate, but in the end, the
    person that signs the check gets what he wants.
     
    SAZ, Mar 26, 2008
    #14
  15. ..oO(SAZ)

    >I strongly disagree. I will play devil's advocate, but in the end, the
    >person that signs the check gets what he wants.


    Not from me. I can't get an architect to design me a house with all
    walls made of thin glass, regardless of how much I pay him (OK, stupid
    example, but you should get the point). Some things simply don't work
    well or can't be done at all. It's the same in the WWW. One could even
    say that it's more complicated in the web, since you not only have to
    care about your own client, but about the client's clients as well.

    YMMV.

    Micha
     
    Michael Fesser, Mar 26, 2008
    #15
  16. dorayme

    dorayme Guest

    In article <>,
    SAZ <> wrote:

    > In article <>,
    > says...
    > > .oO(SAZ)
    > >
    > > >In article <doraymeRidThis-174E99.08541626032008@news-
    > > >vip.optusnet.com.au>, says...
    > > >> I have a client who wants a visitor counter. Please leave it to me to
    > > >> persuade this client not to have it visible. But I am all ears on any
    > > >> recommended methods.
    > > >
    > > >Just give the client what he wants - he's signing the check.

    > >
    > > And? The client is not always king. There are rules which even the
    > > client has to accept.
    > >
    > > Micha
    > >

    > I strongly disagree. I will play devil's advocate, but in the end, the
    > person that signs the check gets what he wants.


    It depends on how hungry you are for the dough. Me, I would rather lose
    a site than it get way too tacky.

    I *suppose* one can always do what the client wants but take any
    references to oneself off! The trouble is that one gets quite attached
    to an otherwise nice enough site and is loathe to not have it for
    advertising.

    --
    dorayme
     
    dorayme, Mar 26, 2008
    #16
  17. dorayme wrote:

    > Thanks for going to the trouble Boji. I will experiment with yours soon.


    Here's another counter that works very well.

    <div id="counter">
    <p><strong>Congratulations! You are visitor number</strong></p>
    <p class="cnt">
    <span>&nbsp;&nbsp;</span>
    <span>4</span><span>,</span><span>0</span><span>0</span><span>0</span>
    <span>,</span><span>0</span><span>0</span><span>3</span></p>
    <p><strong>since yesterday.</strong></p>
    </div>


    Use this CSS:
    #counter { text-align: center; width: 95%; margin-top: 5em; }
    ..cnt span {
    background-color: #000;
    border-top: 2px outset #d0d0d0;
    border-left: 2px outset #d0d0d0;
    border-right: 2px outset #a9a9a9;
    border-bottom: 2px outset #a9a9a9;
    color: #32cd32;
    font-size:175%; /* assumes body is 100% */
    text-align: center;
    margin: 0 -0.2em 0 0;
    padding: 0.1em;
    width: 1.1em;
    }

    --
    -"That's a joke... I say, that's a joke, son".
    -Foghorn Leghorn
     
    Beauregard T. Shagnasty, Mar 26, 2008
    #17
  18. dorayme

    Neredbojias Guest

    On 26 Mar 2008, dorayme <> wrote:

    >> That's basically it. As I said, it's bare-bones and could certainly
    >> be improved, but it works. One drawback is the flatfile; a busy site
    >> might not be able to "keep up" with updating it. Another is using
    >> sessions themselves. -Not conducive to speediness. Statcounter may
    >> be the better option in your circumstances.

    >
    > Thanks for going to the trouble Boji. I will experiment with yours
    > soon. I settled the matter with my client yesterday and put on an
    > invisible statCounter and that was the end of the matter, sort of*.
    > The site gets invisible and the client gets to see the stats he wants
    > to see by logging in to statCounter.


    That's probably your best bet. My biggest gripe with the session one
    (which was admittedly a bit more complex online) is that there is a kind of
    hesitancy to the page under Sessions. In one way it's barely noticeable,
    but if you scrutinize like a typical page author would, it's aggravating as
    hell. Still, it was fun to play with and would be interesting to use with
    a database for busy sites.

    > Micha raised the issue of privacy. There are two issues here.
    > Obviously many companies are not going to be keen on a public
    > exhibition of the stats. But, I take it that he meant, the statCounter
    > folk have access to it and this is a security hole. I have no
    > knowledge of the danger in this, I doubt it would be significant for
    > most companies. What is the idea of the risk? That folk can break the
    > usernames and passwords at statCounter and get to see the stats? That
    > the statCounter folk will be tempted by the devil?


    I think privacy is a valid issue with this, but for most sites, even most
    commercial ones, it's probably passe. If the company is concerned, let
    them foot the bill for a special.

    Btw, thanks for the nice pics. I like 'em!

    --
    Neredbojias
    http://www.neredbojias.com/
    Great sights and sounds
     
    Neredbojias, Mar 27, 2008
    #18
  19. dorayme

    SAZ Guest

    In article <doraymeRidThis-A0B690.08320727032008@news-
    vip.optusnet.com.au>, says...
    > In article <>,
    > SAZ <> wrote:
    >
    > > In article <>,
    > > says...
    > > > .oO(SAZ)
    > > >
    > > > >In article <doraymeRidThis-174E99.08541626032008@news-
    > > > >vip.optusnet.com.au>, says...
    > > > >> I have a client who wants a visitor counter. Please leave it to me to
    > > > >> persuade this client not to have it visible. But I am all ears on any
    > > > >> recommended methods.
    > > > >
    > > > >Just give the client what he wants - he's signing the check.
    > > >
    > > > And? The client is not always king. There are rules which even the
    > > > client has to accept.
    > > >
    > > > Micha
    > > >

    > > I strongly disagree. I will play devil's advocate, but in the end, the
    > > person that signs the check gets what he wants.

    >
    > It depends on how hungry you are for the dough. Me, I would rather lose
    > a site than it get way too tacky.
    >
    > I *suppose* one can always do what the client wants but take any
    > references to oneself off! The trouble is that one gets quite attached
    > to an otherwise nice enough site and is loathe to not have it for
    > advertising.
    >
    >


    This is pure business sense. My typical site runs $1,000 - 3,000 plus I
    almost always get the hosting for another $180/yr. If I turn away a
    $2180 client today on principle, he's not coming back for $1000 or so in
    updates/redesigns and hosting next year and the year after. It all adds
    up.

    I think I got involved in a thread like this a couple months ago. I may
    disagree with the client, but I'll do it, I just don't claim credit for
    it. If it's a really nice site other than the counter, I'll let people
    know about it and tell them that I'm not a fan of counters for the
    following reasons....
     
    SAZ, Mar 27, 2008
    #19
  20. dorayme

    dorayme Guest

    In article <>,
    SAZ <> wrote:

    > In article <doraymeRidThis-A0B690.08320727032008@news-
    > vip.optusnet.com.au>, says...
    > > In article <>,
    > > SAZ <> wrote:

    ....
    > > > >
    > > > ...in the end, the
    > > > person that signs the check gets what he wants.

    > >
    > > It depends on how hungry you are for the dough. Me, I would rather lose
    > > a site than it get way too tacky.
    > >
    > > I *suppose* one can always do what the client wants but take any
    > > references to oneself off! The trouble is that one gets quite attached
    > > to an otherwise nice enough site and is loathe to not have it for
    > > advertising.
    > >

    > This is pure business sense. ... It all adds
    > up.
    >
    > I think I got involved in a thread like this a couple months ago.


    We all get into threads like this all the time. <g>


    > I may
    > disagree with the client, but I'll do it, I just don't claim credit for
    > it. If it's a really nice site other than the counter, I'll let people
    > know about it and tell them that I'm not a fan of counters for the
    > following reasons....


    Fair enough.

    --
    dorayme
     
    dorayme, Mar 27, 2008
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Eeediot
    Replies:
    3
    Views:
    2,261
    =?Utf-8?B?UnVsaW4gSG9uZw==?=
    Dec 22, 2004
  2. Samuel Shulman

    Visitor Counter Filter

    Samuel Shulman, Nov 26, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    390
    Fred Exley
    Nov 26, 2006
  3. Mark
    Replies:
    11
    Views:
    465
    Stuart MacMartin
    Sep 7, 2005
  4. George2
    Replies:
    1
    Views:
    820
    Alf P. Steinbach
    Jan 31, 2008
  5. W. Watson
    Replies:
    5
    Views:
    405
    Dotan Cohen
    Feb 12, 2008
Loading...

Share This Page