8 Replies Latest reply: Dec 10, 2010 8:42 AM by JoeyD1978 RSS

    Link Hit Number

    jr4292 Community Member

      How can I insert number of hits on a link on a webpage? See example below:

       

      http://wvuband.org/submit_a_url/big_east_conference_bands/

        • 1. Re: Link Hit Number
          Nancy O. CommunityMVP

          For all the good hit counters do, you might as well insert a static image of a fictitious number.  Seriously, hit counters are meaningless and they make your site look amateurish.


          If your web host doesn't provide meaningful stats, sign up for Google Analytics (free).

           

           

           

          Nancy O.
          Alt-Web Design & Publishing
          Web | Graphics | Print | Media  Specialists
          http://alt-web.com/
          http://twitter.com/altweb

          • 2. Re: Link Hit Number
            John Waller CommunityMVP

            How can I insert number of hits on a link on a webpage?


            What Nancy said: don't, it's meaningless.

             

            If it makes you feel better, just type random numbers on the page and upload.

             

            See example below:

             

            http://wvuband.org/submit_a_url/big_east_conference_bands/

            Those numbers mean nothing. What is a hit? and is their counter working and it it accurate? what period of time? does anybody care? if not, why show them numbers?

             

            Use Google Analytics for worthwhile stats.

            • 3. Re: Link Hit Number
              the_shocker Community Member

              Setup a database and use sever side scripting to update the database table field for hits +1 everytime the page is loaded. You can also insert the users IP address or logged in session id to prevent multiple hits from one visitor.

               

              Meaningless is an opinion (which is a meaningless opinion in my opinion). If you want a hit counter then have at it. There's several websites that have hit counters that are meaningful and professional. YouTube and vimeo come to mind... A static image of a number doesn't update when a new visit is made. Google analytics is just as "unreliable" as any other hit counter method.

              • 4. Re: Link Hit Number
                MurraySummers CommunityMVP

                Count me in as one of those that believes that a hit counter is a charade.  I wouldn't waste my time.....

                • 5. Re: Link Hit Number
                  the_shocker Community Member

                  Murray *ACP* wrote:

                   

                  I wouldn't waste my time.....

                   

                  news flash: you just wasted your time to state that you would not waste your time....make up your mind.

                   

                  The discussion topic asked how to create a hit counter. It didn't ask what others opinions were on hit counters.

                   

                  The link you clicked on to view this thread had a column for views that gets updated by +1 everytime someone views the page.  Charade? Amature? Why doesn't Adobe/Jive simply put a random number in an image then instead of "wasting their time"?

                   

                  Features that are being called charade and amatuer are on websites that the users making the comments visit multiple times a day... and those visits are being counted and displayed as page views.

                  • 6. Re: Link Hit Number
                    John Waller CommunityMVP

                    The discussion topic asked how to create a hit counter. It didn't ask what others opinions were on hit counters.

                     

                    Thanks for the sermon but newbies here often have no idea that there is a whole world of useful stat gathering options out there and have no idea that there are better solutions available.

                     

                    Most really appreciate being given constructive advice and suggestions which provide them with a new direction and better information.

                    • 7. Re: Link Hit Number
                      garywpaul Community Member

                      Frankly I agree with everyone.  A hit counter is more dangerous than productive.  If someone visits your site on Monday and your hit counter is at 1,002,301, and they come back on Friday to find your hit counter at 1,002,302, it tends to make your site look like a ghost town and chase them away.


                      However, if you really want a counter, here is one.  This counts the number of times a page is visited (or refreshed). I would think you should be able to modify to count links as well.

                       

                      First, create a txt file and save it as hitcounter.txt, enter in it any number you want.  If you want to put in the date so you can make easy reference to how many in how long, enter something like 120810000, so when you visit the page it will show

                       

                      You are visitor number 120810001,

                       

                      and will add from there.

                       

                       

                      <?php

                       

                      echo 'You are visitor number ' ;

                       

                      $count_my_page = ("hitcounter.txt");

                       

                      $hits = file($count_my_page);

                       

                      $hits[0] ++;

                       

                      $fp = fopen($count_my_page , "w");

                       

                      fputs($fp , "$hits[0]");

                       

                      fclose($fp);

                       

                      echo $hits[0];

                       

                      ?>

                       

                      Gary

                      • 8. Re: Link Hit Number
                        JoeyD1978 CommunityMVP

                        I agree typical hit-counters are a waste of time. But I think we're all sorta missing the point here. The page he linked to doesn't show a traditional hit counter, but rather a list of links and a series of counters that show how many people have clicked those links. It's a little different. It's not tracking visits to that page, but rather how many outbound clicks.