If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / User tracking mod

User tracking mod

Started by pinghead on 10 May 2006, 12:06 PM · Views: 184,890

Results 121 to 140 of 861
8 Nov 2006, 11:48 AM
#121
firehorse avatar

firehorse

Zen Follower

Join Date:
Oct 2004
Posts:
98
Plugin Contributions:
0

User tracking mod

Hi,

Thanks for a great mod :thumbsup:

For my ezpages, I'm getting 'page 2' for the title rather than the actual title. Normal product pages and define pages show the correct titles.

Best regards
Alan

[typo in title I can't change :( ]

9 Nov 2006, 10:30 AM
#122
mrtorrez avatar

mrtorrez

New Zenner

Join Date:
Aug 2006
Posts:
74
Plugin Contributions:
0

Re: User tracking mod

Hi,

Anyone used User Track Module with Admin Profiles Module ?

This, because I cannot set the admin-permissions for the user tracking module:sleepy:

grmx

Zen 1.35

16 Nov 2006, 9:37 AM
#123
firehorse avatar

firehorse

Zen Follower

Join Date:
Oct 2004
Posts:
98
Plugin Contributions:
0

Re: User tracking mod

Hi,

Is it just me, or are other people also getting 'Page 2' for the title for EZPages, rather than the actual title.

Thanks
Alan

17 Nov 2006, 3:28 AM
#124
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: User tracking mod

firehorse:

Hi,

Is it just me, or are other people also getting 'Page 2' for the title for EZPages, rather than the actual title.

Thanks
Alan

No not just U, I have this problem also and have had it for a long time, since the beginning. Don't know how to fix though!! :lamo:

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

17 Nov 2006, 9:20 AM
#125
firehorse avatar

firehorse

Zen Follower

Join Date:
Oct 2004
Posts:
98
Plugin Contributions:
0

Re: User tracking mod

Hi,> heavenlynights:

No not just U, I have this problem also and have had it for a long time, since the beginning. Don't know how to fix though!! :lamo:I tracked down this

\includes\functions\extra_functions\user_tracking.php
Line 90

		else
			{
				$page_desc = addslashes(HEADING_TITLE);
				if ($page_desc == "HEADING_TITLE")
					$page_desc = addslashes(NAVBAR_TITLE);
			}

The code 'looks' fine as HEADING_TITLE gets defined all the time but I'm no expert :laugh:

I remember I used "Page 2" as an experiment and although there are no links to it anymore, it was still set on option 1, under Configuration/Define Page Status. I've changed it to option 3. I will report back if this make a difference.

Heavenlynights, is your Page 2 set to option 1?

Best regards
Alan

17 Nov 2006, 9:33 AM
#126
firehorse avatar

firehorse

Zen Follower

Join Date:
Oct 2004
Posts:
98
Plugin Contributions:
0

Re: User tracking mod

Hi,

Nope, that doesn't seem to work. Just had someone on my site and there was a Page 2. I believe this is the code that needs looking at

\includes\functions\extra_functions\user_tracking. php - Line 73

			if (($_GET['products_id'] || $_GET['cPath']))
			{
				if ($_GET['cPath'])
				{
					$cPath = $_GET['cPath'];
					$cPath_array = zen_parse_category_path($cPath);
					$cPath = implode('_', $cPath_array);
					$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];
					$page_desc_values = $db->Execute("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $current_category_id . "'");
					$page_desc = addslashes($page_desc_values->fields['categories_name']) . ' ';
				}
				if ($_GET['products_id'])
				{
					$page_desc_values = $db->Execute("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $_GET['products_id'] . "' and language_id = '" . $_SESSION['languages_id'] . "'");
					$page_desc .= addslashes($page_desc_values->fields['products_name']);
				}
			}
			else
			{
				$page_desc = addslashes(HEADING_TITLE);
				if ($page_desc == "HEADING_TITLE")
					$page_desc = addslashes(NAVBAR_TITLE);
			}

So PSEUDO CODE
Change

if (($_GET['products_id'] || $_GET['cPath']))

to

if (($_GET['products_id'] || $_GET['cPath'] || $_GET['id'] ))
```because ezpages use 'id'. I don't know if you need to check for chapter as well.

then add
if ($_GET['id'])
{
	$page_desc_values = $db->Execute("GET EZPAGE TITLE";

$page_desc .= addslashes($page_desc_values);
}


Can anyone help?

Best regards
Alan
19 Nov 2006, 11:37 PM
#127
mafiasam avatar

mafiasam

Zen Follower

Join Date:
Jan 2006
Location:
Portland, Oregon
Posts:
256
Plugin Contributions:
0

Re: User tracking mod

Pinghead:

To all the users of the usertracking mod!

I'm in the process of upgrading to 1.3.0.1 from 1.2.6, and translating the english files to swedish (8815 lines of code...) and fixing the other mods I've installed.

Please bear with me, this will take a while.

In the meantime, post problems and solutions to the usertracking mod in this thread.

still need a logo?

OldWestPokerSupplies.com – Custom Poker Chips and Other Professional Poker Supplies
Zen Cart 1.3.9.h with Google Base Feeder, Share Bookmarking Widget, Ultimate SEO URL, A Black Pure Template, Quick Updates, Sitemap XML and reCAPTCHA.

21 Nov 2006, 1:03 PM
#128
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: User tracking mod

mrtorrez:

Anyone used User Track Module with Admin Profiles Module ?
This, because I cannot set the admin-permissions for the user tracking module

Beginning with Admin Profiles 1.04 Kuroi provided both a box file and a sql patch to workaround the User Tracking menu issues (a brief mention is in the Admin Profiles readme).

I just installed both Admin Profiles 1.06 and most recent User Tracking (08-30-06) on Zen Cart 1.36. The box file and sql patch seemed to fix it so 'User Tracking Config' shows up in the "Tools" menu. But now being a little more observant I see the 'User Tracking Config' menu entry disappears when I select another menu other than the "Tools" menu. However when I select another item from the "Tools" menu then 'User Tracking Config' reappears on the Tools menu. Now you see it. Now you don't.

I had the impression that 'User Tracking Config' was suppose to appear in the "Configuration" menu? On previous Zen Cart versions it did.

The mystery continues...

Woody

21 Nov 2006, 9:51 PM
#129
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: User tracking mod

Woody!

  1. Run this sql-patch:
UPDATE configuration_group SET visible = '1' WHERE configuration_group_id =999 LIMIT 1 ;
  1. Remove user_tracking_config.php from user_tracking_tools_dhtml.php box (for admin_profile):
$options = array( array('box' => BOX_TOOLS_USER_TRACKING, 'page' => FILENAME_USER_TRACKING),
				);
  1. Remove user_tracking_config.php file from admin directory.

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

22 Nov 2006, 7:06 PM
#130
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: User tracking mod

Firehorse:

The problem with user tracking not listing the correct page name for ez pages is due to a line missing in the ez pages support code.

To correct the problem, edit includes/modules/pages/page/header_php.php

Locate the line which says:

define('NAVBAR_TITLE', $var_pageDetails->fields[pages_title]);

and directly under this line add:

define('HEADING_TITLE', $var_pageDetails->fields[pages_title]);    // JTD:10/03/06 - for user tracking 

I believe you will find then that the correct page names are displayed.

Hope this helps!

Jeff

22 Nov 2006, 7:25 PM
#131
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: User tracking mod

Also if anyone is interested...

Over the years we have updated the user_tracking.php tool and made a few bug fixes. One feature we added was changing the script into a form and adding a popup date selection menu so you can select a specific date to begin the listing. This has proven invaluable since we actually keep several months worth of logs and it was difficult to page though using the previous page at a time GET method.

In any case, I have not previously read this thread so there could be a newer version out with other features or bug fixes. Perhaps who ever is maintaining the code (Pinghead) these days could merge this version with any fixes and updates previously done and make a new release. For now though, if you want to give the version we use a try, it is available here:

user_tracking.zip
.

BTW, this is just the single admin/user_tracking.php file and assumes you already have a working installation.

Respectfully,
Jeff

22 Nov 2006, 7:26 PM
#132
firehorse avatar

firehorse

Zen Follower

Join Date:
Oct 2004
Posts:
98
Plugin Contributions:
0

Re: User tracking mod

Hi,> JeffD:

Firehorse:

The problem with user tracking not listing the correct page name for ez pages is due to a line missing in the ez pages support code.

To correct the problem, edit includes/modules/pages/page/header_php.php

Locate the line which says:

define('NAVBAR_TITLE', $var_pageDetails->fields[pages_title]);

> 
> and directly under this line add:
> 
> ```
define('HEADING_TITLE', $var_pageDetails->fields[pages_title]);    // JTD:10/03/06 - for user tracking 

I believe you will find then that the correct page names are displayed.

Hope this helps!

JeffMany thanks :thumbsup:

Just trying it now.

Best regards
Alan

22 Nov 2006, 10:26 PM
#133
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: User tracking mod

You're welcome...

Let me know if that takes care of the problem and feedback on the updated version posted if you choose to try it?

Thanks,
Jeff

23 Nov 2006, 5:13 AM
#134
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: User tracking mod

gilby:

Here is one that had me confused for a while.

A customer had just completed a sale.
Checked whosonline, same customer shown with completed transaction.

Checked UT, saw a different customer had that session.
Checked the session details and worked out that 2 people used the same computer and both had logged in, one after the other.

Whosonline correctly showed the most recent logged on customer.
UT incorrectly showed the first person to log on.

Would be helpful in the tracking if we could who see had attempted to log in.

I too just observed the same behavior when testing the most recent UT mod on a fresh ZC 1.36 install. I don't remember observing this behavior previously when running UT on ZC v. 1.302 or 1.27. I was not able to test on 1.35.

I logged in to a customer account. Then logged out. Then naviagated the catalog as a guest.

User Tracking shows all my clicks listed under the logged in user session including my clicks after logging out and naviagating as a guest .

Although this is not a major issue for my situation I can see it would be for those tracking admin usage in a mult-user office environment or those who expect different customer logins using the same IP address.

23 Nov 2006, 5:37 AM
#135
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: User tracking mod

JeffD:

Over the years we have updated the user_tracking.php tool and made a few bug fixes. One feature we added was changing the script into a form and adding a popup date selection menu so you can select a specific date to begin the listing. This has proven invaluable since we actually keep several months worth of logs and it was difficult to page though using the previous page at a time GET method.

In any case, I have not previously read this thread so there could be a newer version out with other features or bug fixes. Perhaps who ever is maintaining the code (Pinghead) these days could merge this version with any fixes and updates previously done and make a new release. For now though, if you want to give the version we use a try, it is available here:

user_tracking.zip
.

BTW, this is just the single admin/user_tracking.php file and assumes you already have a working installation.

Hi Jeff,

Petter stated previously in this thread that he will not be able to continue work on the User Tracking mod:
http://www.zen-cart.com/forum/showpost.php?p=273312&postcount=79

Can you integrate your UT code updates into a new version and upload to the ZC download area? Maybe we could "beta" test your updates here before uploading a new version?

BTW I just installed your updated /admin/user_tracking.php file. And I like.

I do note the content associated with the ENTRY_START_DATE and ENTRY_START_DATE_TEXT defines do not display. Is there another file we are suppose to upload or patch or icon images which need uploaded? The snippet below is where the defines are called in /admin/user_tracking.php

<tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="main"><?php echo ENTRY_START_DATE; ?></td> <td class="main"> <?php echo zen_draw_pull_down_menu('sdate_month', $date_month, $start_date_month_val); echo zen_draw_pull_down_menu('sdate_day', $date_day, $start_date_day_val); echo zen_draw_pull_down_menu('sdate_year', $date_year, $start_date_year_val); echo zen_not_null(ENTRY_START_DATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_START_DATE_TEXT . '</span>': ''; ?> </td> <td class="main" align="left"><?php echo zen_image_submit('button_report.gif', 'Update Report'); ?></td> </tr>

Woody

23 Nov 2006, 6:03 AM
#136
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: User tracking mod

a_berezin:

Woody!

  1. Run this sql-patch:

UPDATE configuration_group SET visible = '1' WHERE configuration_group_id =999 LIMIT 1 ;

> 2. Remove user_tracking_config.php from user_tracking_tools_dhtml.php box (for admin_profile):
> ```
$options = array( array('box' => BOX_TOOLS_USER_TRACKING, 'page' => FILENAME_USER_TRACKING),
				);
  1. Remove user_tracking_config.php file from admin directory.

Thanks Andrew! That did it.

One thing in step number two above. Looks like maybe an extra comma? So should it be:

$options = array( array('box' => BOX_TOOLS_USER_TRACKING, 'page' => FILENAME_USER_TRACKING) );

Above is how I did it and it worked. Or maybe the comma doesn't matter? Thanks again.

Woody

23 Nov 2006, 6:15 AM
#137
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: User tracking mod

Woody:

Yes I forgot to send the updated language file, sorry!

For now add these to: includes/languages/english/user_tracking.php

define('ENTRY_START_DATE', 'Start:');
define('ENTRY_START_DATE_TEXT', '*');

I will try to put an updated archive which contains the latest code, GEO_IP data and country flags and upload it to the contrib area early next week. For now the above should get you through.

Thanks for the feedback,
Jeff

23 Nov 2006, 7:58 AM
#138
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: User tracking mod

JeffD:

For now add these to: includes/languages/english/user_tracking.php

define('ENTRY_START_DATE', 'Start:');
define('ENTRY_START_DATE_TEXT', '*');

I assume you meant to add to:
admin/includes/languages/english/user_tracking.php

;-)

> **JeffD:**
>
> I will try to put an updated archive which contains the latest code, GEO_IP data and country flags and upload it to the contrib area early next week. For now the above should get you through.

Very good! Happy Turkey Day!

Woody
23 Nov 2006, 8:34 AM
#139
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: User tracking mod

Woodymon:

I too just observed the same behavior when testing the most recent UT mod on a fresh ZC 1.36 install. I don't remember observing this behavior previously when running UT on ZC v. 1.302 or 1.27. I was not able to test on 1.35.

I logged in to a customer account. Then logged out. Then naviagated the catalog as a guest.

User Tracking shows all my clicks listed under the logged in user session including my clicks after logging out and navigating as a guest .

I change Config > Sessions > Recreate Session
to False.

Continue to observe same negative behavior in User Tracking.

If it is relevant my configure.php files show:
define('STORE_SESSIONS', 'db');

Anyone with clues on this?

Wood

27 Nov 2006, 3:11 PM
#140
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: User tracking mod

This is really not a bug in User Tracking but instead an artifact of the way PHP and Zencart use and maintain sessions. Even though you logout of a customers account and zen_session_destroy() is called, the browser session id remains the same and therefore each UT table write thereafter continues to log based on that session id. The user is tracked as Guest after logoff but because the session was associated previously with the account the tracking report continues to use the name of the last account that used that session.

It is possible this behaved differently in 1.2x Zencart as there were changes made to the logoff and the session handling since that version but at least for now I don't see an easy way to change this behavior. :no:

Jeff