Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
 
Statistik Version 20 online.

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
add a tag to Site visits (Gelesen: 14619 mal)
Sandro kensan
YaBB Newbies
*
Offline



Beiträge: 39
add a tag to Site visits
06.07.13 um 16:55:31
 
Is there any way to add a tag to the link in site visits?

I would like to have pages tagged. So, ad example, if my Site visits stat are:

  • articles/new_year.php
  • articles/beer.php
  • articles/php_web_stat.php


I would like to tag all my articles by adding a tag to the track js code:
Code (Javascript):
<script type="text/javascript" src="http://www.example.com/stat/track.php?mode=js&tag=tagarticles"></script> 



so the Site visits stat becomes:

tagarticles articles/new_year.php
tagarticles articles/beer.php
tagarticles articles/php_web_stat.php

ot any other way to put together the tagged link.

Is there any way to do this?

Tank you.
Zum Seitenanfang
 
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1982
Geschlecht: male
Re: add a tag to Site visits
Antwort #1 - 07.07.13 um 17:59:09
 
http://www.php-web-statistik.de/manual/english/handling.html

Renaming Sites
Sometimes its useful to rename sites in your stat. This can be done within the Admin-Center. Just click on Edit Sitenames. The format you got to use for editing is the following:

    index.html|Startpage
    contact.html|Contact
    ...

Please be aware to use the char "|" for seperation.

Replacement of String Parts
The stat view can be enhanced by replacing parts of your own sitenames (URLs). In cases of changing sitenames over the time, this function enables you to integrate these different sitenames. You can also simply replace all specific string parts you would like to shorten or to merge. The following example should give you an idea of what can be done with this replacement function:

    shop-buy-cart|shoppingcart
    ...

Please notice that between the two words the folling char has to be set: "|"
Zum Seitenanfang
 
 
IP gespeichert
 
Sandro kensan
YaBB Newbies
*
Offline



Beiträge: 39
Re: add a tag to Site visits
Antwort #2 - 16.07.13 um 01:47:16
 
Reimar schrieb am 07.07.13 um 17:59:09:
http://www.php-web-statistik.de/manual/english/handling.html

Renaming Sites
Sometimes its useful to rename sites in your stat. This can be done within the Admin-Center. Just click on Edit Sitenames. The format you got to use for editing is the following:

    index.html|Startpage
    contact.html|Contact
    ...


Tank you for the reply. So you suggest me to manual rename every my article and every my web page if I want to tag them. It is a lot of work, I have hundreds of web page and every new page i have to tag them by a PHPwebStat rename function.

I have also a js track in my 404.php page so some entry in Site Visits have new and strange URL.

Who arrive in my 404.php page can have typed www.example.com/qwaslkbchdh.php, so is not possibly to rename a unknown web page.

I think that the renaming function is not a solution for tagging the web pages. The solution is a tag into the js track code. Don't you?

Is it complex to add this feature?
Zum Seitenanfang
 
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1982
Geschlecht: male
Re: add a tag to Site visits
Antwort #3 - 16.07.13 um 10:23:25
 
You are right, the renaming function is not intended for you. It would be too much work.

So i would use the function "renaming of string parts". The examples you gave in your first posting can be grouped by this. An additional feature of a separate tag within the tracking code can be done too. But i am not sure if the desired renaming of string parts is sufficient for you?

The example of the 404 page should give you the name of the 404-page within the stat, not the url the user made as an input?
Zum Seitenanfang
 
 
IP gespeichert
 
Sandro kensan
YaBB Newbies
*
Offline



Beiträge: 39
Re: add a tag to Site visits
Antwort #4 - 16.07.13 um 14:27:43
 
Reimar schrieb am 16.07.13 um 10:23:25:
You are right, the renaming function is not intended for you. It would be too much work.


Yes, i agree.


Zitat:
So i would use the function "renaming of string parts". The examples you gave in your first posting can be grouped by this.


Yes. It can. In my case all articles is in www.example.com/articles/name_of_article.php so i can rename the string part "articles". But for what i want i can access to the mysql data base and elaborate the stat store in it with a custom php script. So i can separate the articles from the service web pages (comment, login, registration, tag web page, other service page) and from the 404.php pages. (all my articles names is stored in another mysql db)

But if i can insert a tag in js track script, it is more easy. Obviously there must are a way to ordinate the stats by tag.

Zitat:
An additional feature of a separate tag within the tracking code can be done too. But i am not sure if the desired renaming of string parts is sufficient for you?


No, i think it not sufficient the renaming of string.

Zitat:
The example of the 404 page should give you the name of the 404-page within the stat, not the url the user made as an input?


I have try, I have access the page www.example.com/asdfghjkl.php and i have found the asdfghjkl.php in phpwebstat stat. It is a useful feature, I can check all the wrong pages by this feature but it is difficult to find articles/name_o_article.php when the correct name is articles/name_of_article.php and each is present in the stats.

You can try this feature by add in your .htaccess the line ErrorDocument 404 /404.php and then insert the track code in the php page 404.php

Best regards. Smiley
Zum Seitenanfang
 
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1982
Geschlecht: male
Re: add a tag to Site visits
Antwort #5 - 16.07.13 um 15:49:12
 
Ok we will keep the idea of a tag in our mind Smiley

Thanks for your testing regarding the 404 tracking
Zum Seitenanfang
 
 
IP gespeichert
 
Sandro kensan
YaBB Newbies
*
Offline



Beiträge: 39
Re: add a tag to Site visits
Antwort #6 - 16.07.13 um 16:41:34
 
Reimar schrieb am 16.07.13 um 15:49:12:
Ok we will keep the idea of a tag in our mind Smiley

Thanks for your testing regarding the 404 tracking


Very good Smiley

I have tested another time the feature about 404.php now. I have delete the cookie "dontcount" and I have access the page "asdfghjkl.php" of my site. Then I have accessed the PHPwebstat stats and i have find the page asdfghjkl.php in today Site Visits, one visit in page asdfghjkl.php.

For this enhancement you must add a column in data base and change  some lines in track.php.

Code (PHP):
//put in some place:

$tag = $_GET [ 'tag' ];

//and add the insertion in db of $tag

if ( $write_logfile_entry == 1 )
 {
  if ( $db_active == 1 )
   {
    //------------------------------------------------------------------
    if ( $browser          == "" ) { $browser          = "1";       } // 1 = unknown
    if ( $operating_system == "" ) { $operating_system = "1";       } // 1 = unknown
    if ( $site_name        == "" ) { $site_name        = "1";       } // 1 = ---
    if ( $resolution       == "" ) { $resolution       = "1";       } // 1 = unknown
    if ( $js_color         == "" ) { $js_color         = "0";       } // 0 = unknown
    if ( $country          == "" ) { $country          = "unknown"; }

    if ( $tag  == "") { $tag = "unknow";} // unknow or ""

    // write the same entry into the database
    $query = "INSERT INTO ".$db_prefix."_main VALUES (NULL,1,".date("Y",$time_stamp).",".date("m",$time_stamp).",".date("W",$time_stamp).",".date("d",$time_stamp).",".date("H",$time_stamp).",".date("i",$time_stamp).",".$time_stamp.",'".$ip_address."',".$browser.",".$operating_system.",".$site_name.",".$referer.",".$resolution.",".$js_color.",'".$country.",".

$tag."')" ; //add $tag in db

    $result = db_query ( $query , 0 , 0 );
    //------------------------------------------------------------------
   }
  else 



And then display the tag in stat result and order the stats by tag.

It must to manage the transition from old db (N column in one record) to new db (N+1 column in db).

By the way i have (maybe) found a little bug in the actual version of phpwebstat. I have the mysql version because i can manage the stats stored with my own script is there is any lack of feature.

If I enter the PHPwebstat 4.7.0.0 and click on the upper button "Last Hits", I find in User Data column all "anonymous" and not the IPs. I have selected the option "No anonimization" in Admin Center.

(Anonymize IP Address?
If the ip address should be anonymized, please make your selection. You can choose between no anonymization, partial and full anonymization.)

Is this a bug? I suppose to find the IPs and not the string "anonymous".

Edit: Now it shows the IPs, I have change noting, the bug disappear and i don't know why.

Zum Seitenanfang
« Zuletzt geändert: 16.07.13 um 21:06:09 von Sandro kensan »  
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1982
Geschlecht: male
Re: add a tag to Site visits
Antwort #7 - 17.07.13 um 20:27:29
 
Showing the ip address depends also on the level of authentification.
As a normal user, you do not see the ip address, as an admin you see.
Zum Seitenanfang
 
 
IP gespeichert
 
Sandro kensan
YaBB Newbies
*
Offline



Beiträge: 39
Re: add a tag to Site visits
Antwort #8 - 19.07.13 um 01:05:04
 
Reimar schrieb am 17.07.13 um 20:27:29:
Showing the ip address depends also on the level of authentification.
As a normal user, you do not see the ip address, as an admin you see.


Ah, ok, tanks Smiley
Zum Seitenanfang
 
Homepage  
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken