Zen Cart Logo
Forums / All Other Contributions/Addons / User tracking mod

User tracking mod

Views: 183,751

Results 521 to 540 of 861
9 Aug 2013, 4:12 PM
#521
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

User tracking mod

BlessIsaacola:

Thank you so much for taking the time to thorough engage with me on this. I really appreciate it! I downloaded the 1.4.2 again and there's no uninstall instruction. This is simply so you know. I can drop the table from the database manually (but others may not be comfortable with that). The page registration stuff is still new to me which is why I went looking for the uninstall instruction. Have a great weekend!

I did the same, and from reviewing the install sql (Fresh install) developed the following SQL statements to remove information related to this mod from the mySQL database:

DELETE FROM admin_pages WHERE page_key = 'UserTracking';
DELETE FROM admin_pages WHERE page_key = 'UserTrackingConfig';
DROP TABLE IF EXISTS user_tracking;
DELETE FROM configuration WHERE configuration_group_id = '999';
DELETE FROM configuration_group WHERE `configuration_group_id` = 999 AND `configuration_group_title` = 'User Tracking Config' AND `configuration_group_description` = 'User Tracking' AND `sort_order` = 31 AND `visible` = 1;

I haven't tested the code and am only worried about the 2nd to last line, though it is the same line included in the install package. Concern is if the value 999 is unique enough (ie. not used by other packages) that other information in the configuration table with the configuration_group_id of 999 won't exist to be affected.

But, I think that if you paste the above into your admin panel where you have the ability to perform SQL functions, then it will undo database actions previously performed. It is expected that by running this that you will lose all of the tracked data that might exist. Please report the success and I will incorporate into the my next changes (I have mods on another plugin that I have currently placed priority to implement before returning to this one). But it looks like those will work for an uninstall.

9 Aug 2013, 4:21 PM
#522
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

I forgot to mention, please backup your database before running that code. (Will not affect the files showing your site, but will affect the data that is shown.) Don't want something else to be affected, and if it is, want to be able to restore it.

9 Aug 2013, 5:19 PM
#523
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: User tracking mod

mc12345678:

I forgot to mention, please backup your database before running that code. (Will not affect the files showing your site, but will affect the data that is shown.) Don't want something else to be affected, and if it is, want to be able to restore it.

I already took care of it manually via phpmyadmin. Sorry I wasn't able to test your code for you. Thanks!

10 Aug 2013, 2:37 AM
#524
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

BlessIsaacola:

I already took care of it manually via phpmyadmin. Sorry I wasn't able to test your code for you. Thanks!

You're welcome. Technically you would be in the ideal situation now to test that code, by at least running the Sql to install, and then the above SQL to remove. :P

That said, a small description of what the above does is this,
The first line removes the admin menu option to see the list of tracked users.
The second line removes the admin menu option to see the admin settings for user tracking.
The third line removes the user tracking table from the database if it is present.
The fourth line removes all occurrences of the configuration_group_id that equal 999 from the configuration table and
the last line removes what is expected to be only the one entry from the configuration_group table that meets all of the criteria that were set in the install.

12 Aug 2013, 10:35 AM
#525
corseter avatar

corseter

New Zenner

Join Date:
Jun 2010
Location:
Crossmolina, Ireland
Posts:
55
Plugin Contributions:
0

Re: User tracking mod

Hi, I have installed the latest version on 1.3.8 and have everyting installed where it should be but I do not see user tracking under tools in the admin. Can't figure out why? Anybody got any ideas?
Thanks.
A.

12 Aug 2013, 8:30 PM
#526
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

corseter:

Hi, I have installed the latest version on 1.3.8 and have everyting installed where it should be but I do not see user tracking under tools in the admin. Can't figure out why? Anybody got any ideas?
Thanks.
A.

Forgive me for going back to the basics, but you also "ran" the install SQL?

22 Aug 2013, 5:28 AM
#527
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: User tracking mod

Does this version show correctly what is currently in a customers cart if they have a current session?
Sort of like is shown in who's online.

I had used this some years ago,
It seemed there was a bug in earlier versions that would show the same items for multiple current sessions.

22 Aug 2013, 9:59 AM
#528
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

gilby:

Does this version show correctly what is currently in a customers cart if they have a current session?
Sort of like is shown in who's online.

I had used this some years ago,
It seemed there was a bug in earlier versions that would show the same items for multiple current sessions.

I think that issue is currently still present. I hadn't yet made any changes to that part, and I think I have seen the effects of what you describe. I plan on making more changes, I'll definitely consider that as one of the factors to try to correct.

22 Aug 2013, 10:08 AM
#529
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: User tracking mod

mc12345678:

I think that issue is currently still present. I hadn't yet made any changes to that part, and I think I have seen the effects of what you describe. I plan on making more changes, I'll definitely consider that as one of the factors to try to correct.Thank you for that.
I remember the error came in about zen 138a and newer.
May have had something to do with session handling in the admin.
Prior to those versions of zen there was an admin\includes\classes\sessions.php that was removed in zen v138 and newer.
This file may have had an influence on it.

22 Aug 2013, 11:18 AM
#530
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

gilby:

Thank you for that.
I remember the error came in about zen 138a and newer.
May have had something to do with session handling in the admin.
Prior to those versions of zen there was an admin\includes\classes\sessions.php that was removed in zen v138 and newer.
This file may have had an influence on it.

Welcome!

The thing I saw was when I was looking at the user tracking log, someone/something added a large number of items, when I refreshed the logs every entry showed the same thing in the cart rather than just the entry that had something in their cart, but I think it was identical to what was shown on the who's online screen.

So, I'm not sure if that is the same that you observed years ago, but it did appear as the who's online shows (a single "window" with all cart information shown including which session had the item(s).)

27 Aug 2013, 6:13 PM
#531
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: User tracking mod

I tried running the SQL patch via the "install sql patch" in my admin tools, and got this "WARNING: An Error occurred, please refresh the page and try again."

I then tried to manually install it by copypasta into PHPmyAdmin and got this: > Error

SQL query:

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
);

MySQL said: Documentation
#1062 - Duplicate entry 'UserTracking' for key 'page_key'

not sure where to go from here in the install of this mod....

27 Aug 2013, 6:48 PM
#532
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: User tracking mod

OK i went back into myphpadmin and ran one line at a time, executed and everything seems to be working ok now

27 Aug 2013, 8:26 PM
#533
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

petro:

OK i went back into myphpadmin and ran one line at a time, executed and everything seems to be working ok now

Good! Whew. :)

Btw, the error message was indicating that you already had the menu option in the table, so you were being notified that there was nothing further to be done for that line.

29 Aug 2013, 7:07 PM
#534
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: User tracking mod

Ok here is my latest issue... it doesnt appear to be tracking anyone other than me in multiple instances... Ive even had someone today register as a new customer and place an order yet it doesnt show on the user tracking admin page... I have times when I have 20 users on and multiple members browsing yet this tracking only shows when Im on...

29 Aug 2013, 8:01 PM
#535
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

petro:

Ok here is my latest issue... it doesnt appear to be tracking anyone other than me in multiple instances... Ive even had someone today register as a new customer and place an order yet it doesnt show on the user tracking admin page... I have times when I have 20 users on and multiple members browsing yet this tracking only shows when Im on...

Can think of four reasons might be happening: 1) setting to track other users is not enabled in the User tracking configuration area, 2) footer file not updated to track users 3) footer file was updated, but is now overridden, and 4) all files not uploaded successfully.

A potential other cause I could see would be that somehow all other IP addresses are excluded from tracking except your own (seems unlikely at best, but could be). Any error logs generated during that time and do they reveal anything?

29 Aug 2013, 9:16 PM
#536
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: User tracking mod

mc12345678:

Can think of four reasons might be happening: 1) setting to track other users is not enabled in the User tracking configuration area, 2) footer file not updated to track users 3) footer file was updated, but is now overridden, and 4) all files not uploaded successfully.

A potential other cause I could see would be that somehow all other IP addresses are excluded from tracking except your own (seems unlikely at best, but could be). Any error logs generated during that time and do they reveal anything?

1:) is ok
2:)

3:) snapshot above was from the live tpl_footer file
4:) I never got the database SQL file to function properly.... The very first time I tried the copypasta into the admin>tools>install sql patches of the "new_install_user_tracking" sql file and got an error. then I tried it in myphpadmin and got a "duplicate" error, then based on some info In here I changed "TYPE=MyISAM" to "ENGINE=MyISAM" still get "duplicate" error. then I tried to run it one line at a time and got a "duplicate" error when I did these two lines by themselves:

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);

After these two lines the remaining lines went off without a hitch...

DROP TABLE IF EXISTS user_tracking;
CREATE TABLE user_tracking (
  `customer_id` int(11) default NULL,
  `click_id` int(11) default NULL,
  `full_name` varchar(64) NOT NULL default '',
  `session_id` varchar(32) NOT NULL default '',
  `ip_address` varchar(15) NOT NULL default '',
  `time_entry` varchar(14) NOT NULL default '',
  `time_last_click` varchar(14) NOT NULL default '',
  `last_page_url` varchar(128) NOT NULL default '',
  `referer_url` varchar(254) NOT NULL default '',
  `page_desc` varchar(64) NOT NULL default '',
  `customers_host_address` varchar(64) NOT NULL default ''
) ENGINE=MyISAM;

DELETE FROM configuration where configuration_group_id = '1084';
INSERT INTO configuration_group (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES (1084, 'User Tracking Config', 'User Tracking', 31, 1);
INSERT INTO configuration VALUES ('', 'User Tracking (ADMIN)', 'ADMIN_CONFIG_USER_TRACKING', 'true', 'Check the ADMINs behaviour ? (each click will be recorded)', 1084, 2, '2003-03-03 11:19:26', '2003-02-09 21:20:07', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES ('', 'User Tracking (exclude this IP-Address)', 'CONFIG_USER_TRACKING_EXCLUDED', 'your IP', 'Do NOT record this IP Address<br>(like webmaster/owners/Beta-testers)', 1084, 10, '2003-03-04 23:08:38', '2003-02-09 21:20:07', NULL, NULL);
INSERT INTO configuration VALUES ('', 'User Tracking (Session Limit)', 'CONFIG_USER_TRACKING_SESSION_LIMIT', '50', 'Displaying the latest # sessions of this 24 hour period.<br>(SET to 999999 for unlimited per 24 hour period)<br>NOTE:<BR>Watch you space !', 1084, 15, '2003-03-03 11:19:13', '2003-02-09 21:20:07', NULL, NULL);
INSERT INTO configuration VALUES ('', 'User Tracking (your favorite WHOIS URL)', 'USER_TRACKING_WHOIS_URL', 'http://www.dnsstuff.com/tools/whois.ch?ip=', 'Put here you favorite WHOIS tracking site<br>(the IP will follow automaticly after this url)', 1084, 50, '2003-03-03 11:19:13', '2003-03-11 11:40:01', NULL, NULL);
INSERT INTO configuration VALUES ('', 'User Tracking Visitors', 'ZEN_CONFIG_USER_TRACKING', 'true', 'Check the Customers/Guests behaviour ? (each click will be recorded)', 1084, 1, '2003-03-03 11:19:26', '2003-02-09 21:20:07', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES ('', 'User Tracking (Show Product Category when tracking product clicks)', 'ZEN_CONFIG_SHOW_USER_TRACKING_CATEGORY', 'true', 'Show Product Category when tracking product clicks', 1084, 60, '2006-12-05 11:19:26', '2006-12-05 21:20:07', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
29 Aug 2013, 9:40 PM
#537
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: User tracking mod

can anyone explain this portion a little more thorough for me? > 2:) Install sql patch file, preferably by phpMyAdmin then add sql patch to zen (as recommended in the forum).

  1. Login into the admin area, upload via Admin/Tools --> Install SQL Patches the file in Sql --> new_install_user_tracking.sql
29 Aug 2013, 10:00 PM
#538
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

petro:

1:) is ok
2:)

3:) snapshot above was from the live tpl_footer file
4:) I never got the database SQL file to function properly.... The very first time I tried the copypasta into the admin>tools>install sql patches of the "new_install_user_tracking" sql file and got an error. then I tried it in myphpadmin and got a "duplicate" error, then based on some info In here I changed "TYPE=MyISAM" to "ENGINE=MyISAM" still get "duplicate" error. then I tried to run it one line at a time and got a "duplicate" error when I did these two lines by themselves:

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);

> 
> After these two lines the remaining lines went off without a hitch...
> 
> ```
DROP TABLE IF EXISTS user_tracking;
CREATE TABLE user_tracking (
  `customer_id` int(11) default NULL,
  `click_id` int(11) default NULL,
  `full_name` varchar(64) NOT NULL default '',
  `session_id` varchar(32) NOT NULL default '',
  `ip_address` varchar(15) NOT NULL default '',
  `time_entry` varchar(14) NOT NULL default '',
  `time_last_click` varchar(14) NOT NULL default '',
  `last_page_url` varchar(128) NOT NULL default '',
  `referer_url` varchar(254) NOT NULL default '',
  `page_desc` varchar(64) NOT NULL default '',
  `customers_host_address` varchar(64) NOT NULL default ''
) ENGINE=MyISAM;

DELETE FROM configuration where configuration_group_id = '1084';
INSERT INTO configuration_group (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES (1084, 'User Tracking Config', 'User Tracking', 31, 1);
INSERT INTO configuration VALUES ('', 'User Tracking (ADMIN)', 'ADMIN_CONFIG_USER_TRACKING', 'true', 'Check the ADMINs behaviour ? (each click will be recorded)', 1084, 2, '2003-03-03 11:19:26', '2003-02-09 21:20:07', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES ('', 'User Tracking (exclude this IP-Address)', 'CONFIG_USER_TRACKING_EXCLUDED', 'your IP', 'Do NOT record this IP Address<br>(like webmaster/owners/Beta-testers)', 1084, 10, '2003-03-04 23:08:38', '2003-02-09 21:20:07', NULL, NULL);
INSERT INTO configuration VALUES ('', 'User Tracking (Session Limit)', 'CONFIG_USER_TRACKING_SESSION_LIMIT', '50', 'Displaying the latest # sessions of this 24 hour period.<br>(SET to 999999 for unlimited per 24 hour period)<br>NOTE:<BR>Watch you space !', 1084, 15, '2003-03-03 11:19:13', '2003-02-09 21:20:07', NULL, NULL);
INSERT INTO configuration VALUES ('', 'User Tracking (your favorite WHOIS URL)', 'USER_TRACKING_WHOIS_URL', 'http://www.dnsstuff.com/tools/whois.ch?ip=', 'Put here you favorite WHOIS tracking site<br>(the IP will follow automaticly after this url)', 1084, 50, '2003-03-03 11:19:13', '2003-03-11 11:40:01', NULL, NULL);
INSERT INTO configuration VALUES ('', 'User Tracking Visitors', 'ZEN_CONFIG_USER_TRACKING', 'true', 'Check the Customers/Guests behaviour ? (each click will be recorded)', 1084, 1, '2003-03-03 11:19:26', '2003-02-09 21:20:07', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES ('', 'User Tracking (Show Product Category when tracking product clicks)', 'ZEN_CONFIG_SHOW_USER_TRACKING_CATEGORY', 'true', 'Show Product Category when tracking product clicks', 1084, 60, '2006-12-05 11:19:26', '2006-12-05 21:20:07', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');

So, couple of things some related to your original problem, some not. I've looked through the SQL files and I do see that there is a potential to receive the error you had when either applying the SQL update file or the SQL new install file. The error message received though does not bear on the lack of data collection that you are experiencing; however, when I get back to updating this plug-in some more I will incorporate sufficient checks/direction. There really should be no reason to have run the SQL more than the first time it was installed or if upgrading from a version that is older than User Tracking Ver 1.4.0. If any of the times the problem was experienced with the SQL file, then something else was going on or an issue with the database.

To be sure I understood, the tpl_footer file you presented above. Let's assume that you have an active template called ZenCart, so the end of the file shown above is from /includes/templates/ZenCart/common/tpl_footer.php?

With that in mind, I suggest verifying that the two added files /includes/auto_loaders/config.user_tracking.php and includes/classes/observers/class.user_tracking.php be reuploaded. These two files "listen" for the footer code to activate tracking of the users visiting the site. Currently tracking is occurring; however, it is only on the admin side.

29 Aug 2013, 10:10 PM
#539
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: User tracking mod

petro:

can anyone explain this portion a little more thorough for me?

As I recall seeing in this forum, there was a SQL patch file for Zen Cart itself related to one of the older versions of Zen Cart and it needed to be installed prior to this plug-in. That said, seeing that you are running 1.5.1, well I don't know of any SQL patches, but... there may be/the instruction still applies in general: make sure ZenCart is up-to-date prior to use for the version that you use.

Item 4 is about uploading the SQL file to support this plug-in as a new user. (Yes, until this is done, there may be errors that appear in the error log(s), because the data storage location may not exist to accept the data collected in the uploaded files. Another change I think to be made in the instructions (SQL before datafiles), although also thinking that installation could be improved through the use of an autoinstaller as well.

Clear it up any?

29 Aug 2013, 10:18 PM
#540
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: User tracking mod

mc12345678:

So, couple of things some related to your original problem, some not. I've looked through the SQL files and I do see that there is a potential to receive the error you had when either applying the SQL update file or the SQL new install file. The error message received though does not bear on the lack of data collection that you are experiencing; however, when I get back to updating this plug-in some more I will incorporate sufficient checks/direction. There really should be no reason to have run the SQL more than the first time it was installed or if upgrading from a version that is older than User Tracking Ver 1.4.0. If any of the times the problem was experienced with the SQL file, then something else was going on or an issue with the database.

To be sure I understood, the tpl_footer file you presented above. Let's assume that you have an active template called ZenCart, so the end of the file shown above is from /includes/templates/ZenCart/common/tpl_footer.php?

With that in mind, I suggest verifying that the two added files /includes/auto_loaders/config.user_tracking.php and includes/classes/observers/class.user_tracking.php be reuploaded. These two files "listen" for the footer code to activate tracking of the users visiting the site. Currently tracking is occurring; however, it is only on the admin side.

mc, I want to thank you again for helping out here. Im pretty much a noob so I'm trying all this with pretty limited coding skills and knowledge. Yes the image of the code I added to the footer is that of the php file located in my customized template im using. I also verified /includes/auto_loaders/config.user_tracking.php and includes/classes/observers/class.user_tracking.php are both in there and reuploaded them on top of the ones already up there.