Current User: Guest Login
Please consider registering


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Count of param rather than page views in extra sections ?

Reply to Post Add a New Topic
UserPost

12:31 am
April 23, 2010


cssfsu

Member

posts 55

How do I get a unique count of the items in my extra section?

At the moment we show extra sections for particular values .. Is it possible to show the count of those 'unique' values rather than the count of pages?

For example below, we get a count of total page views.. What we need a count of the different/unique  'country' listed.. so for below it would be '10'..

Thanks !!

Usage by Country  
Country  –   Pages Last visit
USA 1070 21 Apr 2010 – 13:11
Canada 465 21 Apr 2010 – 14:39
Korea 163 14 Apr 2010 – 04:43
Australia 128 21 Apr 2010 – 22:03
JAPAN 126 21 Apr 2010 – 21:02
Brazil 112 20 Apr 2010 – 14:22
Colombia 96 19 Apr 2010 – 13:33
Malaysia 71 05 Apr 2010 – 02:40
Ireland 69 21 Apr 2010 – 07:38
COLOMBIA 64 15 Apr 2010 – 13:29
Total 2453  

5:51 pm
April 23, 2010


Jean-Luc

Admin

posts 1125

Hi,

You will have to edit awstats.pl  to get this count on the report.

In version 6.95, look at lines 15861 and 19506: they are used to increment $count . This is in the part of the code that processes the calculation of the sum and the average value of an extra section. You will need to add a few lines of code to print the value of $count .

11:26 pm
April 25, 2010


cssfsu

Member

posts 55

Hi Jean- Can u help me with those lines?

These are the lines I saw in awstats.pl which could relate to the count but I am not sure what I need to add/modify to get the count of the params.

Please help?

# If we ask average or sum, we loop on all other records
    if (   $ExtraAddAverageRow[$extranum]
         || $ExtraAddSumRow[$extranum] )
    {
  foreach ( keys %{ '_section_' . $extranum . '_h' } ) {
        if ( $keysinkeylist{$_} ) { next; }
        $total_p += ${ '_section_' . $extranum . '_p' }{$_};
        $total_h += ${ '_section_' . $extranum . '_h' }{$_};
        $total_k += ${ '_section_' . $extranum . '_k' }{$_};
        $count++;
     }
}

9:04 pm
April 27, 2010


Jean-Luc

Admin

posts 1125

I gave indications on how to do it here above. If you need a tested modified version of the source code, please send us an email asking for a price quotation for this customization of the AWStats source code.

6:30 pm
April 28, 2010


cssfsu

Member

posts 55

Thanks Jean.. I was able to get the count printed out..

So another question- now i have 4 extra sections.. and i was able to get the count printed for all of them..

But I really need to consolidate those 4 'counts' together in 1 section, say like in the Monthly history section at the top. Any leads ?

7:46 pm
April 28, 2010


Jean-Luc

Admin

posts 1125

That's not an easy one, as there is no provision in AWStats to consolidate the results of 4 extra sections in one report.

In some cases, you should be able to add a fifth extra section defined in such a way that it collects all hits collected by the 4 other extra sections. Admittedly this is not very effective as the 5th extra section will duplicate the contents of the 4 other extra sections.

A nicer and more effective solution consists of writing a script that will consolidate the data of the 4 extra sections in the AWStats database files and generate the special report you need.

Reply to Post

Reply to Topic:
Count of param rather than page views in extra sections ?

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
8 + 4
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
16 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 639
Posts: 2710

Membership:

There are 257 Members
There have been 304 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)