yaloe2017 Posted November 16, 2018 Share Posted November 16, 2018 Hello, My visitors online is not working (Showing 0 all the time) I do the following: 1. Install Analyics plugin (I see visitors in Analytics) 2. The Data Mining stats module is installed and 'Save page views for each customer' is enabled. 3. Try to reset the stats modules. I don't no what the problem is here. Anyone help? Thanks! Link to comment Share on other sites More sharing options...
El Patron Posted November 17, 2018 Share Posted November 17, 2018 demo mode in dashboard enabled? also you must activate the "Save page views for each customer" option in the "Data mining for statistics" (StatsData) module in order to see the pages that your visitors are currently viewing. hope this helps Link to comment Share on other sites More sharing options...
yaloe2017 Posted November 17, 2018 Author Share Posted November 17, 2018 Hi El Patron, 1. I enabled "Save page views for each customer" in the "Data mining for statistics" module. 2. Demo mode is disabled Unfortunately still not working 😞 Very strange bug 😞 1 Link to comment Share on other sites More sharing options...
El Patron Posted November 18, 2018 Share Posted November 18, 2018 did you turn on debug mode see if anything thrown? also check chrome dev console for .js errors. that's all I can think of at the moment, except to uninstall that stats module and load a fresh one from github. Link to comment Share on other sites More sharing options...
yaloe2017 Posted November 19, 2018 Author Share Posted November 19, 2018 Very strange problem I have no .js errors in my Google console A fresh install is not working Link to comment Share on other sites More sharing options...
El Patron Posted November 21, 2018 Share Posted November 21, 2018 On 11/19/2018 at 2:43 PM, yaloe2017 said: Very strange problem I have no .js errors in my Google console A fresh install is not working I did manage to get visitor online working by clicking 'upgrade' on stats modules. However the pages not found which I think is super important does not work and is a known issue on github. Link to comment Share on other sites More sharing options...
El Patron Posted November 25, 2018 Share Posted November 25, 2018 Hi, I made rookie mistake by not checking 'positions' of the stats modules. I noticed for example pages not found was not hooked properly. I reset it and it works now. Earlier I mentioned that I selected 'upgrade' on visitors online module then it also started working. Please reset visitors online module and it should start working for you. Link to comment Share on other sites More sharing options...
wearequattro Posted April 12, 2019 Share Posted April 12, 2019 Hi, I'm having exactly exactly the same issue in 1.7.4.2 I followed your instructions, upgraded all modules and still online visitors is at 0. Link to comment Share on other sites More sharing options...
gosrl Posted May 13, 2019 Share Posted May 13, 2019 I have the same issue with 1.7.1.1 The module was working properly. After installing a couple of other modules (NT Backup and Restore and Cash on Delivery with fees), is has stopped working. Now even if I disable those module, the online visitor count is always 0. Any idea? Thank you Link to comment Share on other sites More sharing options...
Himanshubishtt Posted May 13, 2019 Share Posted May 13, 2019 At starting, I was also having the same problem but after when I add the script of Google Analytics, Dashboard also started showing online visitors. (see attachment) Read that content above for more help. Thanks Link to comment Share on other sites More sharing options...
gosrl Posted May 15, 2019 Share Posted May 15, 2019 Uhmmmm, I'm already using the Google Analytics code the way you suggested. I think this is not the cause. My problem is: the counter was properly working till some days ago and now it's not working anymore. Link to comment Share on other sites More sharing options...
Himanshubishtt Posted May 16, 2019 Share Posted May 16, 2019 @gosrl There is a module Visitors Online. Make sure to enable that. Link to comment Share on other sites More sharing options...
gosrl Posted May 22, 2019 Share Posted May 22, 2019 The module is enabled. I've found a solution on another post, which basically consists in moving the Visitors Online module to the "Footer" hook. I didn't had time to test it, but I think this is the right solution, as there's probably some conflict between the Analytics Code and the Visitors Online module. Bye Link to comment Share on other sites More sharing options...
Rizzzle Posted July 6, 2019 Share Posted July 6, 2019 On 5/22/2019 at 11:04 AM, gosrl said: The module is enabled. I've found a solution on another post, which basically consists in moving the Visitors Online module to the "Footer" hook. I didn't had time to test it, but I think this is the right solution, as there's probably some conflict between the Analytics Code and the Visitors Online module. Bye How do you move it? In Positions > Transplant there is no option to move to Footer hook. Any ideas? P.S 1.7.4.4 here Link to comment Share on other sites More sharing options...
zplus2 Posted October 28, 2019 Share Posted October 28, 2019 On 11/25/2018 at 4:37 PM, El Patron said: Please reset visitors online module and it should start working for you. Hello, Where can I find visitors online module? In my BO dashboard when I click on Online Visitors it redirects me to the Stats page but there is an error Module not found. I want to install the module, but I cannot find it. I have the installation PS1.7.5.0 zip file but there is not statsvisitorsonline or dashvisitorsonline or anything like that. What is the exact name of the module? Link to comment Share on other sites More sharing options...
kotzie Posted April 25, 2020 Share Posted April 25, 2020 I don't know if will help someone, but if you reached this thread because your "Visitors online" shows a number but when you open the admin stats it doesn't show anyone there, like this: Then you're problably with a wrong server time locale definition. I run PS on an EC2 instance and it started just right after an module update (which afterall has nothing to do with the problem), so I got a little time to solve it. In my case, I set my locale again to Sao_Paulo with: sudo ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime After that I rebooted the EC2 instance and voila. Seems like a "EC2" update changed it back to default for some reason. Hope it helps! Best regards. Link to comment Share on other sites More sharing options...
Martin Mi Posted November 7, 2020 Share Posted November 7, 2020 I had the same issue In PrestaShop 1.7.6.4. The reason was that the module lost it's original position on the HOOK. The solution is to reset the module "Source Data for Statistics" to it's original settings or manually add the position of this module to the HOOK displayBeforeBodyClosingTag. See below for details. How to add module "Source Data for Statistics" to correct hook: 1. reset the module: "Source Data for Statistics" on Menu >> Modules >> Module "Source Data for Statistics" settings >> Reset 2. Check that the Hook is associated correctly in Menu >> Design >> Module Positions to the hook displayBeforeBodyClosingTag 3. statistics should start working for non-maintenance IP addresses Hope this helps. Best Regards, Martin Mi Dataquo, s.r.o. www.dataquo.eu Link to comment Share on other sites More sharing options...
Lalaru Posted January 21, 2021 Share Posted January 21, 2021 (edited) Hi, This can come from a problem with IPv6 on the server. Check you do not have an IPv6 in your maintenance ip exclusion list (Configure > Shop parameters > General > Maintenance > Maintenance IP) An IPv4 is 4 numbers separated by a dot like : 78.193.135.55 An IPv6 is a hexadecimal string with numbers and letters separated by a colon like : 2001:41d0:2:2c88:: IPv6 is the "new" internet protocol but there are still some old servers not fully compatibles with it. If you have the Nt Backup And Restore module installed : The Nt Backup And Restore module has an option to automatically start a backup daily just by enabling it (still a standard cron is available). Like a webcron, this is the 2N server which remotely start the backup. To make it run even in maintenance mode, the module add the 2N server IP (v4 and v6) in the maintenance exclusion list. You can manage it in the Automation menu of the module > Advanced > Automation by 2n-tech.com IP authorization Choose "Authorize only IPv4" (or "Authorize neither IPv4 nor IPv6" to disable it completely). Best regards, Damien 2N Technologies Edited January 21, 2021 by Lalaru (see edit history) Link to comment Share on other sites More sharing options...
kurisuti Posted August 9, 2021 Share Posted August 9, 2021 On 11/7/2020 at 9:01 PM, Martin Mi said: I had the same issue In PrestaShop 1.7.6.4. The reason was that the module lost it's original position on the HOOK. The solution is to reset the module "Source Data for Statistics" to it's original settings or manually add the position of this module to the HOOK displayBeforeBodyClosingTag. See below for details. How to add module "Source Data for Statistics" to correct hook: 1. reset the module: "Source Data for Statistics" on Menu >> Modules >> Module "Source Data for Statistics" settings >> Reset 2. Check that the Hook is associated correctly in Menu >> Design >> Module Positions to the hook displayBeforeBodyClosingTag 3. statistics should start working for non-maintenance IP addresses Hope this helps. Best Regards, Martin Mi Dataquo, s.r.o. www.dataquo.eu Simply rehooking the "Data mining for statistics" module to "displayBeforeBodyClosingTag" worked like a charm for me. Thanks! Link to comment Share on other sites More sharing options...
supportshebam Posted May 30, 2023 Share Posted May 30, 2023 Hello, I dissuade the subject a bit but I have the same problem of online visitors. If I reset the statistics module. It will reset everything and my dashboard will show all statistics to zero or it will reconfigure only the module and I will recover my order data etc? Link to comment Share on other sites More sharing options...
dztcid26 Posted October 23, 2023 Share Posted October 23, 2023 On 1/21/2021 at 9:53 AM, Lalaru said: Hi, This can come from a problem with IPv6 on the server. Check you do not have an IPv6 in your maintenance ip exclusion list (Configure > Shop parameters > General > Maintenance > Maintenance IP) An IPv4 is 4 numbers separated by a dot like : 78.193.135.55 An IPv6 is a hexadecimal string with numbers and letters separated by a colon like : 2001:41d0:2:2c88:: IPv6 is the "new" internet protocol but there are still some old servers not fully compatibles with it. If you have the Nt Backup And Restore module installed : The Nt Backup And Restore module has an option to automatically start a backup daily just by enabling it (still a standard cron is available). Like a webcron, this is the 2N server which remotely start the backup. To make it run even in maintenance mode, the module add the 2N server IP (v4 and v6) in the maintenance exclusion list. You can manage it in the Automation menu of the module > Advanced > Automation by 2n-tech.com IP authorization Choose "Authorize only IPv4" (or "Authorize neither IPv4 nor IPv6" to disable it completely). Best regards, Damien 2N Technologies Its'work for me, i remove all the IP in maintenance, i let maintenance OFF the dashboard activity come back ! thank you Link to comment Share on other sites More sharing options...
Filip Albert Posted October 28, 2023 Share Posted October 28, 2023 The issue in our case was indeed the IPv6 problem mentioned above. However, the actual bug was in the dashactivity module, specifically in the dashactivity.php file on line 152. The bug was fixed 5 months ago, but the module has not had a new stable version released since. See the link below. https://github.com/PrestaShop/dashactivity/blob/f752eb9051e2046ffcf853f0f2baff2fad8fa0e5/dashactivity.php#L152C32-L152C143 $maintenance_ips = implode(',', array_filter(array_map('ip2long', array_map('trim', explode(',', $maintenance_ips))), '\strlen')); Link to comment Share on other sites More sharing options...
RobbieBlokeToys Posted November 3, 2023 Share Posted November 3, 2023 We've just installed a live chat module and it flags whenever there is a visitor on the site. Chat module: 5 visitors on site. Google Analytics: 10 visitors on site. Prestashop: 126 visitors on site. Even if we average it out over the "in the last 30 minutes" it doesn't match any other source of information. There's nothing you can really do with this statistic anyway, apart from assess usage, but if it's wrong (and it clearly is) that makes it completely worthless as a data point. Link to comment Share on other sites More sharing options...
Filip Albert Posted November 3, 2023 Share Posted November 3, 2023 (edited) 2 hours ago, RobbieBlokeToys said: We've just installed a live chat module and it flags whenever there is a visitor on the site. Chat module: 5 visitors on site. Google Analytics: 10 visitors on site. Prestashop: 126 visitors on site. Even if we average it out over the "in the last 30 minutes" it doesn't match any other source of information. There's nothing you can really do with this statistic anyway, apart from assess usage, but if it's wrong (and it clearly is) that makes it completely worthless as a data point. I encountered the same issue with the PrestaShop online visitors. The problem is that PrestaShop displays the number of connections. However, it appears that every page view is counted as a connection. So, I modified the code slightly to count only unique IP address connections, and then I was able to see a number for PrestaShop online visitors that was similar to the one from Google Analytics for the past 30 minutes. On line 169 (see the link bellow), I altered the MySQL query as follows (add GROUP BY c.ip_address) https://github.com/PrestaShop/dashactivity/blob/f752eb9051e2046ffcf853f0f2baff2fad8fa0e5/dashactivity.php#L176C15-L176C15 $sql = 'SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer, "-" as page FROM `' . _DB_PREFIX_ . 'connections` c INNER JOIN `' . _DB_PREFIX_ . 'guest` g ON c.id_guest = g.id_guest WHERE (g.id_customer IS NULL OR g.id_customer = 0) ' . Shop::addSqlRestriction(false, 'c') . ' AND (\'' . pSQL(date('Y-m-d H:i:00', time() - 60 * (int) Configuration::get('DASHACTIVITY_VISITOR_ONLINE'))) . '\' < c.`date_add`) ' . ($maintenance_ips ? 'AND c.ip_address NOT IN (' . preg_replace('/[^,0-9]/', '', $maintenance_ips) . ')' : '') . ' GROUP BY c.ip_address ORDER BY c.date_add DESC'; Edited November 3, 2023 by Filip Albert Remove colon because it was printed as an emoticon (see edit history) Link to comment Share on other sites More sharing options...
RobbieBlokeToys Posted November 6, 2023 Share Posted November 6, 2023 On 11/3/2023 at 1:18 PM, Filip Albert said: The problem is that PrestaShop displays the number of connections. However, it appears that every page view is counted as a connection. So, I modified the code slightly to count only unique IP address connections, and then I was able to see a number for PrestaShop online visitors that was similar to the one from Google Analytics for the past 30 minutes. I figured it was being very generous in assessing online visitors, but it's disappointing they haven't rectified this over the many iterations of PS. We're currently enjoying a free trial of a live chat bot and I think we're going to go with the paid version. This shows us who is online and allows us to communicate with them in real time. I was skeptical, but we have actually seen a good increase in sales because of it. It's already paid for itself. I would recommend those who can try a live chat solution. That allows you to actually make use of online data. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now