ASP 3.0, Need help with Page Counter Component

Discussion in 'ASP General' started by Roland Ramirez, Jan 30, 2004.

  1. I am trying to monitor the number of visits on various Excel and HTML
    reports on our website. I would like to create a web page that has the
    various hit statistics for various URLs.

    I thought I could use the Page Counter Component to do this using
    MyPageCounter.Hits(url);
    but I cannot get it to work with any URL. I can get it to work with
    the page the code is located in if I do not specify a URL, but I
    cannot get it to work to keep track of the visits to other URLs, in
    this case Excel and HTML reports my business group maintains.

    Any help would be greatly appreciated.

    Here is what I tried to do.



    <%

    Set MyPageCounter = Server.CreateObject("MSWC.PageCounter")

    MyPageCounter.PageHit()

    %>



    This page has been visited
    <%=MyPageCounter.Hits("d:/inetpub/wwwroot/web_project/folder/book1.xls")%>
    times.<br>
     
    Roland Ramirez, Jan 30, 2004
    #1
    1. Advertising

  2. Uh, d:/inetpub/... is not a URL, that's "sort of" a local file system
    reference, and it is not even in valid form.

    Why don't you track clicks on the link to the XLS yourself? Or use a stats
    package that analyzes IIS logs? I'm not sure how much support there is for
    these MSWC components, and most of them have been deprecated or merely left
    out of new operating system versions.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "Roland Ramirez" <> wrote in message
    news:...
    > I am trying to monitor the number of visits on various Excel and HTML
    > reports on our website. I would like to create a web page that has the
    > various hit statistics for various URLs.
    >
    > I thought I could use the Page Counter Component to do this using
    > MyPageCounter.Hits(url);
    > but I cannot get it to work with any URL. I can get it to work with
    > the page the code is located in if I do not specify a URL, but I
    > cannot get it to work to keep track of the visits to other URLs, in
    > this case Excel and HTML reports my business group maintains.
    >
    > Any help would be greatly appreciated.
    >
    > Here is what I tried to do.
    >
    >
    >
    > <%
    >
    > Set MyPageCounter = Server.CreateObject("MSWC.PageCounter")
    >
    > MyPageCounter.PageHit()
    >
    > %>
    >
    >
    >
    > This page has been visited
    > <%=MyPageCounter.Hits("d:/inetpub/wwwroot/web_project/folder/book1.xls")%>
    > times.<br>
     
    Aaron Bertrand - MVP, Jan 30, 2004
    #2
    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. nicholas
    Replies:
    3
    Views:
    856
    nicholas
    Oct 4, 2004
  2. The Eeediot
    Replies:
    3
    Views:
    2,260
    =?Utf-8?B?UnVsaW4gSG9uZw==?=
    Dec 22, 2004
  3. George2
    Replies:
    1
    Views:
    820
    Alf P. Steinbach
    Jan 31, 2008
  4. Roland Ramirez

    Page Counter Component, ASP 3.0

    Roland Ramirez, Jan 30, 2004, in forum: ASP General
    Replies:
    3
    Views:
    418
    A. Webmaster
    Feb 2, 2004
  5. Miguel Minora
    Replies:
    1
    Views:
    158
    Miguel Minora
    Jan 11, 2005
Loading...

Share This Page