How to update the definitions of OS, browsers and their icon with StatPress Visitors 1.4 or Daily Stat 1.3 or higher?

Mis à jour le

Everything happens in the files

  • os.dat
  • browsers.dat
  • searchengines.dat
  • spider.dat

located in the folder /wp-content/plugins/statpress-visitors/def/

  1. When you see in the main « Overview » page of Visitors  a browser or Os that  is not well identified or an « Undefined agent », just look in the data table « statpress » with PhpMyAdmin, in the corresponding column « agent » of the visit in the datatable
  2. When you found it, you copied a right mouse click and paste it into the field « User Agent String Explained » section of this site dedicated to decode the « agents »: User Agent String.Com
    You can try too these site :user-agent-string.info
  3. After a few seconds, you have the result and you can update the file os.dat and browsers.dat.
  4. These files can be opened with a text processing software like Word or with Notepad++.
    Each line represents a single OS or a single browser. Each line is separated into two parts with the delimiter | (pipe).

    1. The left side is the name as it appears on the main « Overview » page of StatPress Visitors,
    2. the right side is the identifier that is sent by the browser to StatPress Visitors.

    It then suffices to add a line composed as follows:

    Name|identifier|
    • However, do not add it to chance.
      1. Delete all the characters « space » of the identifier.
      2. Give the name that appears on the screen : Name.
      3. There is an order to comply with, suppose you have the following lines:
        Windows 7|WindowsNT6.1|
        Windows XP|WindowsNT5.1|
        

        If you add the line :

        Windows NT 4|WindowsNT|
        

        before these 2 lines, then Windows XP and 7  will not be recognized.

        Indeed, the lines will be made as well:

        Windows NT 4|WindowsNT|
        Windows 7|WindowsNT6.1|
        Windows XP|WindowsNT5.1|
        

        StatPress Visitors look each definition line from the first to the end to find the first match. As identifiers XP, NT4 and 7  begin with the same stringWindowsNT”,  only NT 4 will be recognized, Statpress finding a match, will not look any further, which makes sense. Then XP and 7 will not be recognized.

        It is therefore necessary to place the « common identifier » at the end.

        Thus, we must have the lines:

        Windows 7|WindowsNT6.1|
        Windows XP|WindowsNT5.1|
        Windows NT 4|WindowsNT|
        

        And now, it’s work.
        Thus, XP and 7 are well recognized. StatPress Visitors stop his research before the common identifier “WindowsNT”

    • Please note you must delete all « space » characters in the identifier. If the line is:
      Mac OS X Snow Leopard|Mac OS X 10_6_8|

      You must write:

      Mac OS X Snow Leopard|MacOSX10_6_8|

      For historical reason, the line |Netscape|Mozilla|must be at the end of the file. There is a lot of browsers who are Mozilla : Firefox, Internet Explorer, Opera. Netscape was the first browser with the identifier « Mozilla » , it has simply been copied by others.

      The exact same principle for browsers.

  5. Now you can add the icon of the browser or OS in accordance with the following three rules:
    1. Write the name of the browser or the Os with lowercase
    2. Replace all the characters « space » by « _ » (underscore).
      • In StatPress Vistors 1.4 or Daily Stat 1.3 : Delete all characters « point ».
      • In 1.5 version replace all « point » by a dash ‘-‘.

    For example, if you added Opera 9.01 in the folder  /statpress-visitors/images/browsers the filename of the icon must be

    • opera_901.png with StatPress Visitors 1.4 or Daily Stat 1.3
    • or must be opera_9-01.png with 1.5 versions

    in the folder /statpress-visitors/images/browsers.

    You can also actualise all your datable.

    Enjoy !

    Si vous avez trouvé une faute d’orthographe, informez-nous en sélectionnant le texte et en appuyant sur Ctrl + Entrée