Jump to content

[Module] Statstrackvisits, See detail tracking of your visitors for period chosen


Raph59
 Share

Recommended Posts

Many of the 404 are in my admin directory. I don't want to reveal that so I can't supply you with a screenshot. The "Pages not found" module that already exists doesn't give you timestamps. That's why I added my own module.

/Kjeld

Share this post


Link to post
Share on other sites

I have this module installed which is a great tool for tracking visitors.

The module also picks up lots of test entries which is annoying. Is there anyway of deleting these test entries and accounts?

Cheers

Share this post


Link to post
Share on other sites

If you have the last version of Statstrackvisits, click on "Click here for show or hide more option", you can now enter one or many IP address, and click on "Save this setting" if you want always hide this IP address

Share this post


Link to post
Share on other sites

Hi Ralph!

1st of all let me congratulate for this fantastic module, just the ideal tool to keep your customers on the right track :)

Anyway I have this problem...until nov 23 2009 all my stats are working fine, but after dec 2009 I can not get any data at all! I have tried 1 day ,1 week 1 month..nothing will work. I also did that thing you advice for 1.1.05 users like me.
I have uninstalled and install version 1.2.3 several times but nothing works..Any idea how come it worked up to Nov 2009 and now its blank?!?!
Only blank pages, and 0 customers is shown. Xml charts, google charts also 0.

I really like to use your tool 'cause its very usefull to our bussiness...

So, If u or other members have any idea any help would be much appreciated :)

Rgds,
E.Silva

Share this post


Link to post
Share on other sites

A new version will come out very very soon, hope it solves the problem, because at first I did not see what could be a problem, you can
check if your database contains actual data in the ps_connections and ps_connections_page if your are friendly with MySQL... and if you choose the older date when the module working, it's not ok?

Share this post


Link to post
Share on other sites

HI Raph.

Yes, if I choose Nov 2009 for example it gives all the returning data/statistics...
But after Dec 2009 I alway get 0 no matter what... :(
And other stats from back office are fully working, like Sales and orders, max cart.
Altough visits and visitors tab not working either by your module or by back office module...really strange..

Rgds,
E.Silva

Share this post


Link to post
Share on other sites

HI Raph.

Yes, if I choose Nov 2009 for example it gives all the returning data/statistics...
But after Dec 2009 I alway get 0 no matter what... :(
And other stats from back office are fully working, like Sales and orders, max cart.
Altough visits and visitors tab not working either by your module or by back office module...really strange..

Rgds,
E.Silva


Really strange Oo

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hello Raph59,

i have problem for 2-3 days.

in back office, visitors online and tracking visitors i dont have any stats, they are all zero.

do you have any idea ?

thank you for your interest.

Share this post


Link to post
Share on other sites

Hello Raph59,

i have problem for 2-3 days.

in back office, visitors online and tracking visitors i dont have any stats, they are all zero.

do you have any idea ?

thank you for your interest.


And

HI Raph.

Yes, if I choose Nov 2009 for example it gives all the returning data/statistics...
But after Dec 2009 I alway get 0 no matter what... :(
And other stats from back office are fully working, like Sales and orders, max cart.
Altough visits and visitors tab not working either by your module or by back office module...really strange..

Rgds,
E.Silva


If you have PS 1.1.0.5, you can try this bugfix

http://www.prestashop.com/forums/viewreply/175293/

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Anyone know how to show which CMS page was visited?

I tried changing the code from

case 'cms.php':
               return ''.$this->l('CMS pages :').' '.$this->l('GCS, legal,...');
               break;



to

case 'cms.php':
               return ''.$this->l('CMS pages :').''.'id_object';



but no luck.

Thanks
Jack

Share this post


Link to post
Share on other sites

Hello jnktaylor,

it's not possible because when Prestashop saving CMS page, it does not save the number of CMS

I want to say that the new version of Statstrackvisits is soon ready with a few small novelty and a fairly major change ;)

Share this post


Link to post
Share on other sites

This module is a great help see where costumers look, and what they are doing! Im look forward to the update!!

Though, i get many 404.pages, and i know users dont that that many surfing the site! Can this be explained?

Share this post


Link to post
Share on other sites

This module is a great help see where costumers look, and what they are doing! Im look forward to the update!!

Though, i get many 404.pages, and i know users dont that that many surfing the site! Can this be explained?


Try to copy and past your favicon in the root of your PrestaShop, for me this has solved the problem.

Else you can check with the stats module "pagesnotfound"

Share this post


Link to post
Share on other sites

  • 1 month later...

Hi Ralph.

We're still enyoying your module but have a small problem.
Some days the statstrackvisits page shows blank page.
The tabs and sidebar is visible but no tracking is shown.
Not even text is shown in frame. The next day it will be fine.
I suspect it something to do with abandoned carts. Any ideas?

Thanks again
Jack

Share this post


Link to post
Share on other sites

Hello

Your website receives can be a lot of hits, you know if the days when you are just a blank page is the days when you have heavy traffic?

My module has difficulty managing sites with heavy traffic, I soon finished the new version (I know I'm long sorry, unfortunately I made this module to lost time) which should better manage many sites with heavy traffic.

Raph

Share this post


Link to post
Share on other sites

Hi Raph.

It sounds great that you are working on a version for sites with heavy traffic. I'm working on a shop with 1000 visitors a day. The database locks for a minute or more when I use your module.

If you need some sample data please contact me.

/Kjeld

Share this post


Link to post
Share on other sites

Hello

Your website receives can be a lot of hits, you know if the days when you are just a blank page is the days when you have heavy traffic?

My module has difficulty managing sites with heavy traffic, I soon finished the new version (I know I'm long sorry, unfortunately I made this module to lost time) which should better manage many sites with heavy traffic.

Raph


Not much traffic. 88 visits yesterday when the problem occurred.

Jack

Share this post


Link to post
Share on other sites

hello,
i have last version of this great module (thanx for it), but is possible to add refresh function ? (with option to own set period)?


and i have problem wtih cart (i cant is anything in this module cart section)

thanx

Share this post


Link to post
Share on other sites

I discovered that statstrackvisits overloads the SQL server when the cart table is large. I fixed it like this:

    private function getVisitors($resultperpage, $page, $limit, $orderby, $orderbyobject, $http_referer, $showstep, $showcart, $employee, $timeofflinemin, $timeofflinesec, $ipfilter)
   {
       return Db::getInstance()->ExecuteS('
       SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer, c.id_connections, c.id_guest, clp.time_start, (TIMEDIFF(MAX(cp.`time_start`), MIN(cp.`time_start`))) AS duration'.( preg_match("/^1.1/", _PS_VERSION_ ) ? '' : ', ct.id_cart' ).'
       FROM `'._DB_PREFIX_.'connections` c
       LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections
       INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest
       INNER JOIN `'._DB_PREFIX_.'page` p ON p.id_page = cp.id_page
       LEFT JOIN `'._DB_PREFIX_.'connections_page` clp ON ( c.id_connections = clp.id_connections AND TIME_TO_SEC(TIMEDIFF(NOW(), clp.`time_start`)) < '.(($timeofflinemin * 60) + $timeofflinesec).')
       '.( preg_match("/^1.1/", _PS_VERSION_ ) ? '' : 'LEFT JOIN
       ( SELECT id_guest, date_upd, id_cart FROM `ps_cart`
       WHERE date_upd >= \''.$employee->stats_date_from.'\' ) ct
       ON ( ct.id_guest = c.id_guest AND ct.`date_upd` BETWEEN c.date_add AND (SELECT MAX(time_start) FROM `'._DB_PREFIX_.'connections_page` WHERE id_connections = c.id_connections))' ).'
       WHERE (g.id_customer IS NULL OR g.id_customer = 0)
       AND '.( preg_match("/^1.1/", _PS_VERSION_ ) ? 'c.`date_add` LIKE \''.pSQL(ModuleGraph::getDateLike()).'\'' : '(c.`date_add` BETWEEN '.ModuleGraph::getDateBetween().')' ).'
       '.( $http_referer ? 'AND c.http_referer LIKE \''.$http_referer.'\'' : '' ).'
       '. ( $showstep == 'error' ? 'AND p.id_page_type = 8' : ( $showstep == 'anypage' ? '' : 'AND p.id_page_type = 3 AND p.'.$showstep.'' )) .'
       '. ( $ipfilter ? 'AND c.ip_address NOT IN ( '. implode(',',array_values($ipfilter)).' )' : '' ).'
       '.(( !preg_match("/^1.1/", _PS_VERSION_ ) AND $showcart ) ? 'AND ct.id_cart != 0' : '' ).'
       GROUP BY c.id_connections
       '.($limit == 1 ? '
           ORDER BY '.($orderbyobject == 'c.id_guest' ? 'c.ip_address' : $orderbyobject).' '.$orderby.'
           LIMIT '.(($page*$resultperpage)-$resultperpage).', '.$resultperpage 
       : '').''
       );
   }



Notice the changed lines

        ( SELECT id_guest, date_upd, id_cart FROM `ps_cart`
       WHERE date_upd >= \''.$employee->stats_date_from.'\' ) ct



I have attached my file.

/Kjeld

statstrackvisits.php

Share this post


Link to post
Share on other sites

I think my problem is different than heavy use problem. It's almost as if
a cart or connection got put in the tables incorrectly. It only happens every
4 or 5 days. They last occurance was 5/12/2010. Here is a screen shot.

Jack

23555_w0Ct3BIaI8zRfeVl5DwG_t

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Wonderfull module!
It's exactly what i was looking for.

Thanks a lot for your job!

P.D. Some people should consider to put a PayPal donation link. I'd donate for some things like this one.

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 5 weeks later...

I'm getting an error when trying to look at the tracking stats page:

Undefined variable: showname in .../modules/statstrackvisits/statstrackvisits.php on line 104

Using v 1.2.3 of the mod, and v 1.3.1 of PS

Anyone else had this?

Share this post


Link to post
Share on other sites

  • 4 weeks later...
  • 2 months later...

Update (10/11/11) v1.3.0

Updated fairly significant, please see below for more detail.

Do not forget to set write permissions to CHMOD 777 for the file "setting.inc.php" which is in the directory "modules/statstrackvisits /"

/*
v1.3.0
   11/11/2010
       - Update flags ( ludo from forum of Prestashop )
       - Now we see research done when a person is on the search page (not 100% reliable because the word is found based on the date, so if two person types a search interval of 3 seconds ...)
       - We now see the manufacturer's name
       - Fixed bug "PHP Warning: Wrong parameter count for imagedestroy() in /modules/statstrackvisits/iplocator.php on line 40"
       - Adding a link to the site to conduct http://ip-whois-lookup.com/ with the ip address of the person concerned to have more information about an IP address
       - Reorganization of the module: the homepage of the module is now a summary of those currently online
       - Adding a list of IP addresses or ID Member to monitor
       - Ability to name the saved IP addresses (both IP monitor that IP to ignore)
       - Possibilitéy to put the options to zero and clear the list of IP addresses to ignore and monitor
       - Fixed bug that sometimes did not see the baskets, the last basket now known to the customer is displayed.
       - Addition where possible to the target page that caused a 404 ( presta-dyr from forum of Prestashop )
       - Code optimization and performance making queries lighter.
*/



Please go to the first page for download it

Share this post


Link to post
Share on other sites

Thanks Raph59 for the new update ;)

Nice features you added, glad you find the time again to update your great and useful module.
This is something i use everyday and i m glad with the update.

Thanks again.

ysco..

Share this post


Link to post
Share on other sites

I receive this errors in BO,

Warning: Missing argument 4 for StatsTrackVisits::getComeBack(), called in /home/web/public_html/modules/statstrackvisits/statstrackvisits.php on line 1909 and defined in /home/web/public_html/modules/statstrackvisits/statstrackvisits.php on line 123

Warning: Missing argument 4 for StatsTrackVisits::getComeBack(), called in /home/web/public_html/modules/statstrackvisits/statstrackvisits.php on line 2043 and defined in /home/web/public_html/modules/statstrackvisits/statstrackvisits.php on line 123

Any help?, thanks.

Share this post


Link to post
Share on other sites

I'll get the following when I click on IP monitoring icon:

Warning: array_search() [function.array-search]: Wrong datatype for second argument in
[deleted path]\modules\statstrackvisits\statstrackvisits.php on line 889

Warning: array_search() [function.array-search]: Wrong datatype for second argument in
[deleted path]\modules\statstrackvisits\statstrackvisits.php on line 891

Share this post


Link to post
Share on other sites

  • 2 weeks later...

I have had some problems with registered customers not being tracked properly. It may be a problem in combination with the way my checkout works, I'm not quite sure. I traced it down to classes/Guest.php.

I changed line 163 from:

        // The current guest is removed from the database
       $this->delete();



to

        // The current guest is removed from the database
       if (Db::getInstance()->Affected_Rows() > 0)
           $this->delete();



And now customers are shown as expected in statstrackvisits. The file/change is the same for 1.2 and 1.3.

/Kjeld

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Using PS 1.3.3, it seems to work except that I get a message "calendar deactivated" on the first option "connected". See attached screen shot (I use a French version of PS). The other three work fine. Any ideas ?

36175_pX7CYr2Ek5tR4pChcgFW_t

Share this post


Link to post
Share on other sites

Thanks. I see some but not all the visitors in the "connected" section and all the visitors in the "visitors" section whether they are currently connected or not. This may appear normal but I placed a product in the caddy just to see how the module would react and see that the "visitor" and the caddy only show up in the "visitors" section but not in the "connected" section. Why ? Also, the visitors who show up in the "connected" section all have a 0 time duration. Again, why ?

Share this post


Link to post
Share on other sites

I really missed the old display where you could see members and visitors simultaneously, so I took the liberty of adding a fifth option.

/Kjeld


I have download this php scrip but where can i plug it in? PLease help. Thank you.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hi all,

I really like this module, but I have a question. I downloaded the latest version (1.3.0); announced in post 145 of this forum.

In post 131 I noticed a fix for the MySQL overload though that I can't seem to find in version 1.3.0. Do I still need to apply that fix to version 1.3.0? I don't like it very much when our MySQL database gets overloaded.

Hope you can help me out.

Keep up the good work!
Thanks,
Theo

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Thanks for the great module. Very informative stats. Totally easy to install and get up and running.

I am using it on PrestaShop version 1.3.2.3
"Statstrackvisitors" module release v1.3.0 and I have since replaced the "statstrackvisits.php" file which came with the v1.3.0 download with Kjeld's "statstrackvisits.php" file (Post #150) to be able to have the 5th option of seeing both members and visitors simultaneously, instead of each only seperately.

The enclosed "readme.txt" file of the module said to set the ENTIRE Statstrackvisitor Module folder to the permission of 777, yet the forum post where one downloads the module says ONLY to set the "setting.inc.php" file to 777 permission.

I first set the entire folder to 777 and the module ran fine except the Geo Flags and Origin were not showing. So I set the folder to permission of 755 and only the "setting.inc.php" file to 777. Refreshed my browser window and the flags and locations of the visitors were there.

I then replaced the "statstrackvisits.php" file" with Kjeld's version (being sure to set the permission of this file to 755) once again refresh of my browser and now I have the 5th option of how to view members and visitors simutaneously.

Could really not have been easier.

Thanks again! Will donate.

Kind regards,
Lisa

Share this post


Link to post
Share on other sites

To Mark4040 (Post #163),

1. After unzipping it to your Modules folder on your server and setting the correct permissions you can then find the module to install in your
Back Office -->Modules tab. It is entitled "Tracking visitors v1.3.0". (See screen capture)

2. Click to install.

3. Then go to your "Stats" tab and scroll down to see "Tracking visitors" in the list of Stats.

4. Click on this link and you will see the module in action.

5. First screen will show in red "Calendar disabled" but that is only because you are viewing only currently "Connected" users which are not bound by a date. In other words, you are viewing only the people connected right now to your site. (See screen capture attached)

6. Click on one of the other tabs to view either "Monitoring", "Members", "Visitors" and if using Kjeld's file from post #150 then you will also be able to see both "Vistors and Members" simultaneously.

7. If you are viewing another parameter like "Members" then you can set a Calendar date to see their activity for the time frame you specify. (a week, a month, etc...)

8. Finally and I think this is very cool and at first I overlooked it you can click on the IP address number (example... 80.128.232.155 from my screen capture) and you can see the pages they have viewed in the order they have viewed them.

Enjoy!

by the way... my Back Office looks different in color scheme than the original install of PrestaShop but that is only because I have reworked all the CSS to match our website.

Kind regards,
Lisa

38014_UVHgC7tMbUlDuclIpuA5_t

38015_czNILwHPfzzVFLUqizum_t

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hi

I have installed this module and I have read through the different posts and added Kjeld’s modifications. However, I find it odd that nearly all of my visitors have a starting date from last year, even if it is their first visit on my site. This date changes each day (it adds an extra day)

Some of the visits appear to have looked at lot of different pages but then when I look at the stats, maybe 50 pages are shown with the date from last year and maybe a few with today's date.

Also I have added my favicon to the root folder of my shop, but this shows up on almost all of the stats entries as a 404-error

The online date and time is also in the wrong format. It says (838:59:59) besides all the vistors

Can anyone please explain why the above happens?

39715_qrt5SYNShA4izVfRiRo1_t

39716_6IDuZiyz7ZOhuaLxUtKJ_t

39717_qPs2F4zGDAfCEhjMVslx_t

Share this post


Link to post
Share on other sites

  • 2 weeks later...
Hello, i install these module in 1.3.1, all work ok but some IP numbers show "127.255.255.255" instead of the real IP .
It´s possible to fix this error?

Thanks!


that is your ip...there is option in there to exclude some ip. it works for me.

Share this post


Link to post
Share on other sites

Here's replacement code to track which CMS page was viewed

            case 'cms.php':
               if ($id_object)
               {
                   $sql = Db::getInstance()->ExecuteS('
                   SELECT meta_title
                   FROM `'._DB_PREFIX_.'cms_lang`
                   WHERE id_cms = '.$id_object.'
                   AND id_lang = '.$id_lang);
                   return ''.$this->l('CMS :').' '.$sql[0]['meta_title'];
               }
               else
                   return ''.$this->l('CMS Category').'';                    
               break;

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hi,

I've just found a way to make this module work with Prestashop v1.4. I didn't have time to fully test it but it looks like it works.
Just replace the statstrackvisits.php file with the one attachched to this post.

Then, you have to uninstall the module and install it again.

Stéphane

statstrackvisits.php

Share this post


Link to post
Share on other sites

Hello stephane-v.

Thanks for sharing but i just try`t this new file but it don`t work for me and get the following error,

/public_html/modules/statstrackvisits/statstrackvisits.php on line 117

It has probably something to do with the added 'order-opc.php', do not know if i m the only one with this problem.

Best regards,

ysco..

Share this post


Link to post
Share on other sites