Announcement

Collapse
No announcement yet.

Can we log page not found events?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can we log page not found events?

    Our environment:

    Miva Merchant 5.5
    Production Release 8 Update 12
    Miva Merchant Engine v5.20
    Database API: mysql


    We are using Lexity to see what our visitors are up to.

    Since we are a reseller, when manufacturers discontinue a product we usually delete it from the store - sometimes we delete an entire category but since search engines may have already indexed those pages a customer may click a search engine results and end up with a page not found scenario.

    Sometimes we might have a link to a product or category on some page and we might forget to change or remove the references that might be in other places. These are not the same as broken links.

    When Lexity shows me that somebody is getting a page not found message I like to try to fix it but I have to be watching to see it and I don't want to sit there and watch Lexity all day.

    When a customer clicks one of those linksi n the store, or from a search engine, Miva might display something like:

    Product 'asdfasdf' is not available at this time.
    Category 'asdfasdf' is not available at this time.

    I think it would be interesting to be able to somehow track and be able to tell what brought them to the NTFD page and since Miva seems to know which product or category is not available at this time and brought them to the NTFD page is it possible using things that don't require purchasing a module to somehow log that so we can check out that log once in a while to see if there is something we need to fix/redirect, etc.?
    Last edited by joseibarra; 09-18-14, 01:52 AM.

    #2
    Re: Can we log page not found events?

    The normal web server access log will record a 404 in those instances and typically the page the person had been on will be logged in the same log file as the http referer field if referer logging is enabled.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Re: Can we log page not found events?

      As Dave already wrote the info is in the access log files but you could also use toolbelt or toolkit to write the data into your own log file. The log fie can contain where the customer was coming from and what wasn't found (ctgy/prod). It requires a bit of template coding but nothing major.
      Andreas Toman
      PCINET, LLC

      Miva Merchant Design, Development, Integration & Support
      We built over 200 Miva Merchant stores!
      Miva shopping cart design & integration service and see our Portfolio!


      e-mail: [email protected]
      web: www.pcinet.com
      LinkedIn: Andreas Toman
      phone: (786) 250-2056 (Miami, FL)

      Comment


        #4
        Re: Can we log page not found events?

        I think 404 errors come from the web server and I have already directed them a custom page via .htaccess.

        These "errors" are coming from the Miva NTFD page when somebody clicks a link to a category/product that is no longer in the store and I think that is different than a 404 since they are coming from the store. It is easy to generate a 404 and that is handled differently than an invalid category or product link.

        Yes I forgot to mention we have the Toolkit (who doesn't?) and I will look at that... if somebody can suggest something in the Toolkit that will help me get started that would be good!

        Comment


          #5
          Re: Can we log page not found events?

          A not found event in Merchant returns a 404 response code to the visitor, so those are recorded by the web server as a 404 in the web log even for requests handled by Merchant. However, if you have placed an ErrorDocument 404 directive in your .htaccess, make absolutely sure you are not using a full URL as the destination; i.e.:

          ErrorDocument 404 http://www.mydomain/NTFD.html

          If you do that, it will send a 200 to the client and log it as a 200, so search engines will treat the page as still there.

          I also recommend against using Merchant as the 404 page for content outside of the store itself; i.e. in an ErrorDocument directive. Most commerce websites have an exclusive IP address, and that in turn means most sites receive thousands of bogus requests per day from viruses, bots, hackers, etc. looking for exploitable programs. If Merchant is handling those requests, it means thousands of executions of your store unnecessarily, generating load on the server and store that takes away from the legit store requests. A static page consumes dramatically less resources to serve in situations where the requests don't need the dynamically generated one.
          David Hubbard
          CIO
          Miva
          [email protected]
          http://www.miva.com

          Comment


            #6
            Re: Can we log page not found events?

            I forget how we figured out or read where to handle 404s, but in the .htaccess I have this:

            ErrorDocument 404 /NotFound404.html

            I am pretty sure that we don't have any "real" broken links in the store as we pay a service to give us a report and they usually come up with one or two a month, but they are always typos in links to PDFs or images or something like that and easy to fix.

            Nobody has any advice or examples for how to use the Toolkit to log a visit to the NTFD page or is this just a new concept?

            Comment

            Working...
            X