Shop OBEX P1 Docs P2 Docs Learn Events
PINK page hits — Parallax Forums

PINK page hits

TimCTimC Posts: 77
edited 2006-01-30 20:30 in BASIC Stamp
Hi all,
Has anyone determined how to count Web page hits? I have looked at all the special purpose registers could not find any clues.

Thanks Tim

Post Edited (TimC) : 1/29/2006 2:29:43 AM GMT

Comments

  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2006-01-29 04:26
    i would go get a counter off the web
    example(even though i dislike them): http://www.bravenet.com/
  • TimCTimC Posts: 77
    edited 2006-01-29 06:16
    Good idea I had not thought of this. I see why you dislike them...

    I really would like a simple solution, everything contained within the stamp or Netburner.

    PINK should be able to do this. Unique users might be a problem but then again the PINK is a 32bit processor running at 95mhz.

    Tim C
  • GearHeadGearHead Posts: 23
    edited 2006-01-29 09:17
    Here is a HTML page using Java for a page counter.

    I've tested it on my Pink.
  • GotenGoten Posts: 70
    edited 2006-01-29 17:26
    Bravenet it's a very useful website. gives many web's tools.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards from Chile

    Goten
  • TimCTimC Posts: 77
    edited 2006-01-29 17:50
    Thanks GearHead and everybody.
    I have added the code GearHead attached. It's working!


    Tim
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2006-01-29 21:20
    Just remeber that GearHeads code is only a counter for you.... It does not store global hits
  • BullwinkleBullwinkle Posts: 101
    edited 2006-01-30 04:55
    Hey GearHead, that's Javascript, not Java.


    And it counts the number of times you have the page, not the total number of times the page has been hit. Since the javascript code is execute on the client-side, in your browser. It uses cookies to store this number in your browser.
  • GearHeadGearHead Posts: 23
    edited 2006-01-30 07:13
    True, it’s Javascript, still Java not matter what topping you put on it.

    And yes, it uses an activeX component to track individual hits to a site via a cookie.

    I see TimC is now using a script for Bravenet for a page counter, cool…
  • TimCTimC Posts: 77
    edited 2006-01-30 13:52
    Hi all,

    Page hits are a mystery when the process is hidden somewhere else.
    I think avoiding cookies, activeX components and maybe javascript is best if possible.

    PINK HAS a place to put a simple number. I am now grabing the number adding 1 to it but the trick is passing a value back to a PINK register without user interaction.

    While my web page is active you can see this now at the TEST NB counter.

    ?How can I post a number back to PINK without a submit button??
    Trying:
    <input type="hidden" name="Nb_var01">
    Is not enough.


    Regards
    Tim

    Post Edited (TimC) : 1/30/2006 3:49:10 PM GMT
  • TimCTimC Posts: 77
    edited 2006-01-30 20:30
    I think I got it!
    I renamed my index.htm to newhome.htm and replaced index.htm with the following file:



    INDEX.HTM FILE FOLLOWS

    <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
    <!-- Tim's pagecounter web page for SB70 Jan 29 2006 -->

    <html>
    <body>

    <form name="my_hidden" method="post" action="newhome.htm">
    <input type="hidden" size="25" maxlength="70" name="my_url" value="">
    <input type="hidden" size="10" maxlength="15" name="Nb_var01" value="">
    </form>

    <script>
    document.my_hidden.my_url.value = document.URL;
    var my_count
    my_count = eval(<Nb_var01>)
    my_count++
    my_count = my_count.toString()
    document.my_hidden.Nb_var01.value = my_count;
    document.my_hidden.submit();
    </script>

    </body>
    </html>
Sign In or Register to comment.