A customer from me want to track ONLY registered users. Here is the code to include into tpl_footer.php:
CheersCode:<?php if (ZEN_CONFIG_USER_TRACKING == 'true' AND $_SESSION['customer_id'] != '') { zen_update_user_tracking(); } ?>
A customer from me want to track ONLY registered users. Here is the code to include into tpl_footer.php:
CheersCode:<?php if (ZEN_CONFIG_USER_TRACKING == 'true' AND $_SESSION['customer_id'] != '') { zen_update_user_tracking(); } ?>
How do you know if they are a "registered user" if they haven't logged in?
This means you would only start tracking most of them when they commence the checkout process.
You will miss all the clicks they used to get to that point.
To me thats the important bit, not the half dozen or so clicks to get thru the checkout.
Sure a small number login when they hit the website, but on my websites that is very small.
Hello,
I'm using this mod in v1.51. Superuser can use this mod without problems but no the rest of profiles (They get always:
Sorry, your security clearance does not allow you to access this resource.
Please contact your site administrator if you believe this to be incorrect.
Sorry for any inconvenience.)
The original sql code for the registration:
/MYADMIN/includes/extra_datafiles/user_tracking_database_tables.php:Code:INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('UserTracking', 'BOX_TOOLS_USER_TRACKING', 'FILENAME_USER_TRACKING', '', 'tools', 'Y', 10000); INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('UserTrackingConfig', 'BOX_TOOLS_USER_TRACKING_CONFIG', 'FILENAME_USER_TRACKING_CONFIG', '', 'tools', 'Y', 10001);
- sql code exist in the admin_pages tableCode:<?php define('TABLE_USER_TRACKING', DB_PREFIX . 'user_tracking'); define('DIR_WS_FLAGS', 'images/flags/'); define('BOX_TOOLS_USER_TRACKING', 'User Tracking'); define('BOX_TOOLS_USER_TRACKING_CONFIG', 'User Tracking Config'); define('FILENAME_USER_TRACKING', 'user_tracking.php'); define('FILENAME_USER_TRACKING_CONFIG', 'user_tracking_config.php'); ?>
- admin_page_to_profiles, profile_id to page_key is ok (profile_id =2, page_key = UserTracking and UserTrackingConfig)
- admin_profiles profile_id=2 is defined
I'm lost, I don't see nothing wrong here. I need your light.
Cheers!
Last edited by pititis; 13 May 2013 at 01:38 PM.
Solved!
Just remove the .php extension in FILENAME_USER_TRACKING and FILENAME_USER_TRACKING_CONFIG
/MYADMIN/includes/extra_datafiles/user_tracking_database_tables.php
CheersPHP Code:
<?php
define('TABLE_USER_TRACKING', DB_PREFIX . 'user_tracking');
define('DIR_WS_FLAGS', 'images/flags/');
define('BOX_TOOLS_USER_TRACKING', 'User Tracking');
define('BOX_TOOLS_USER_TRACKING_CONFIG', 'User Tracking Config');
define('FILENAME_USER_TRACKING', 'user_tracking.');
define('FILENAME_USER_TRACKING_CONFIG', 'user_tracking_config');
?>
Last edited by pititis; 13 May 2013 at 03:01 PM.
Has anyone incorporated tracking restrictions using the spiders file? And to take it a step further, incorporated it so that the data is still logged with an option to hide spider views or show them when reviewing the log?
This last question is asked, because it seems that ip addresses to not log are specifically that, not logged versus not shown. Would think that would want to log all accesses (unless REALLY concerned about log space) and just ignore them when reviewing the logs.
I've gone ahead and made the modifications described above. Additionally added code that was obtained from this forum that addressed the presentation of the idle time. The following is taken from the update file.
Added ability to hide/show spider visits using the spiders.txt file of Zen Cart. Default view is to hide spider visits.
Modified the information shown at the bottom of the view to show the number of users and number of bots/spiders that have visited. This spider/bot information will show whether the actual visit is or is not shown.
Also incorporated modifications published in this Thread/Forum related to display of the Idle time of a visitor. (Previous calculations lead to incorrect display depending on timezone.) Just added it in, so still needs to go through review and acceptance.
Fyi,
Submitted another change to the user tracking mod. The list of changes are as follows (by memory):
1. Identified that in some cases the OnChange event of clicking the new Hide/Show Spiders buttons didn't work on first click, so rewrote to use an OnClick event instead.
2. Removed some of the hard coded text that had recently been added and placed in the language files.
3. Added a Back to Today and Forward to Today option if the date chosen is two or more days away from the date when the date on which the selection was made.
4. When moving the text to the language file ensured that values of zero displayed for number of "events".
5. Incorporated the use of the notify system instead of calling a function into the footers. (The previous method still works); however, new installs are directed to use the notify method.
6. By request of the Zen Cart Team trimmed down the readme files so that there is only a new install and upgrade file by incorporating the history of the previous updates into the update readme.
It is likely/possible that this update will be available after this coming weekend; however, the Zen Cart Team as far as I know also is a volunteer support group, so please be patient while they make their reviews to publish.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I am hoping someone can help me. We upgraded to Zen Cart 1.5.1 and User Tracking 1.4.2 and I am getting these errors in the log file:
Code:[07-Aug-2013 01:26:56 America/New_York] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0=A&products_id=13493', 'Learning Resources Pretend and Play Food Snack Set', 'O' at line 1 :: insert into user_tracking (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, referer_url, page_desc, customers_host_address) values ('0', 'Guest', '931f031bebc22bab074f3e9f9dd60475', '198.100.145.182', '1375853216', '1375853216', '/index.php?main_page=\'0=A&products_id=13493', 'http://www.clevershoppers.com/index.php?main_page='0=A&products_id=13493', 'Learning Resources Pretend and Play Food Snack Set', 'OFFICE_IP_TO_HOST_ADDRESS') in /MASKED/includes/classes/db/mysql/query_factory.php on line 120Code:[07-Aug-2013 01:26:57 America/New_York] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0=A', 'NAVBAR_TITLE', 'OFFICE_IP_TO_HOST_ADDRESS')' at line 1 :: insert into user_tracking (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, referer_url, page_desc, customers_host_address) values ('0', 'Guest', '42c15c5d5052c1bd8b9601e07c1c65ff', '198.100.145.182', '1375853217', '1375853217', '/index.php?main_page=product_info&products_id=\'0=A', 'http://www.clevershoppers.com/index.php?main_page=product_info&products_id='0=A', 'NAVBAR_TITLE', 'OFFICE_IP_TO_HOST_ADDRESS') in /MASKED/includes/classes/db/mysql/query_factory.php on line 120These are just some examples, there are 100s of these errors in the log. On The Admin side, I see tracking and such but obvious something is wrong here.Code:[07-Aug-2013 01:26:58 America/New_York] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0=A+and+1=1&products_id=13493', 'Learning Resources Pretend and Play Food Snack ' at line 1 :: insert into user_tracking (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, referer_url, page_desc, customers_host_address) values ('0', 'Guest', '4fbeab1bb17a9a9ab8b444106ba60f2d', '198.100.145.182', '1375853218', '1375853218', '/index.php?main_page=\'0=A+and+1=1&products_id=13493', 'http://www.clevershoppers.com/index.php?main_page='0=A+and+1=1&products_id=13493', 'Learning Resources Pretend and Play Food Snack Set', 'OFFICE_IP_TO_HOST_ADDRESS') in /MASKED/includes/classes/db/mysql/query_factory.php on line 120
Thanks!
Bookmarks