Jump to content
Sign in to follow this  
Druide

User Tracking with Admin 1.31 Released

Recommended Posts

I installed this great contribution last night on two of my sites. The one works just fien, but the other dos not. It does not record any visitors at all (table is also empty). And YES there has been visitors ;)

 

Another funny observation is that text variables sometimes show the values from text files, other times the field names!! Suddenly changes back again without any changes at all in site code. Can this be caused by an error in the configuration file ?

 

Mogens

Share this post


Link to post
Share on other sites

A supplementary observation re problem No 2: When I open a fresh browser window, text variables are shown correct. But when I press "View Session" all variable text values are replaced with variables !?

The problem remdies itself after a certain time, but when I press "View Session" the problem is back.

 

Mogens

Share this post


Link to post
Share on other sites

i have rad all th trhread and i know they are fixes for the quotes pbe

 

i modified like proposed but still got a pbe with quote in title in the admin :

 

pbewithtitlequote.jpg

 

1064 - Something is wrong in your syntax pr?s de 'exp?dition')' ? la ligne 1

 

insert into user_tracking (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, page_desc) values ('', 'Guest', '8b0e390c9d3e0bd60e49737d35ce325e', '127.0.0.1', '1069388554', '1069388554', '/rc/admin/modules.php?set=shipping', 'Modules d\\'exp?dition')

 

the title of modules.php?set=shipping is "Module d'expedition"

Edited by azer

MS2

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for a great contribution.

 

One problem that I am getting is that there is one persistant user as shown underneath here. What is going on here? This IP is always there and kind of pings over few minutes or so......

 

Thanks for the help.

 

 

Click Count: 56 Start Time: 11:32:06 Idle Time: 09:20:19

End Time: 10:59:15 Total Time: 08:27:09

 

Country: United Kingdom

IP Address: 195.92.168.166

Host: webcacheB04a.cache.pol.co.uk

Originating URL:

10:59:15: /catalog/

 

10:38:27: /catalog/

 

10:26:03: /catalog/

 

09:05:32: /catalog/

 

08:47:27: /catalog/

 

07:25:46: /catalog/

 

06:51:36: /catalog/

 

03:44:00: /catalog/

 

02:41:15: /catalog/

 

01:36:08: /catalog/

 

00:16:53: /catalog/

 

23:20:09: /catalog/

 

22:41:18: /catalog/

 

22:28:06: /catalog/

 

22:24:29: /catalog/

 

22:16:26: Solid Brass Frames /catalog/index.php?cPath=22

 

22:16:11: Silver Plated Frames /catalog/index.php?cPath=21

 

22:15:56: Glass Frames /catalog/index.php?cPath=25

 

22:15:47: HEADING_TITLE /catalog/advanced_search_result.php?keyw

ords=clock+frame

 

22:15:08: /catalog/

 

22:03:11: /catalog/

 

22:03:08: /catalog/

 

22:02:57: /catalog/

 

22:02:55: Silver Plated Frame - 8 x 10" /catalog/product_info.php?cPath=21&produ

cts_id=30

 

22:02:43: /catalog/

 

22:02:41: Silver Plated Frames /catalog/index.php?cPath=21

 

22:02:19: /catalog/

 

22:02:17: /catalog/

 

22:02:05: /catalog/

 

22:02:03: Glass Frame - 8 x 10" /catalog/product_info.php?cPath=25&produ

cts_id=44

 

22:01:59: /catalog/

 

22:01:50: Silver Plated Frames /catalog/index.php?cPath=21

 

22:01:45: /catalog/

 

22:01:32: Glass Frames /catalog/index.php?cPath=25

 

22:01:23: /catalog/

 

21:53:57: /catalog/

 

21:07:05: /catalog/

 

21:07:03: /catalog/

 

20:48:30: /catalog/

 

20:08:13: /catalog/

 

19:53:05: /catalog/

 

16:57:11: /catalog/

 

16:26:19: /catalog/

 

16:20:18: /catalog/

 

16:08:38: /catalog/

 

16:06:20: /catalog/

 

16:00:40: /catalog/

 

14:57:34: /catalog/

 

14:19:01: /catalog/

 

14:16:11: /catalog/

 

13:27:07: /catalog/

 

13:13:57: /catalog/

 

12:58:53: /catalog/

 

12:34:13: /catalog/

 

11:54:12: /catalog/

 

11:32:06: /catalog/

Share this post


Link to post
Share on other sites

I have been looking thru the archives and have not seen any solution to this one.

 

Is there any way to "lock" the admin to the language you have originated into the admin from?

 

Reason being is that on my site, which is running an english/french language set,but with the admin side being in english only this mod shows some mischevious behaviour.

 

If you click on the "view session" link for any session in which someone has changed to the french language, the whole admin interface changes to french as well.

 

I saw someone ask similar about german admin snapping to english on their site earlier in the thread but did not see any fixes so forgive the reasking but this is one of the list of "monkey on my back" fixes :)

 

tia and yes to say what everyone else has, great mod !

 

Impudent1

LeapFrog Productions

Share this post


Link to post
Share on other sites

I'm having a weird problem as well.

 

It appears as those all the sessions are being recorded as one. For example, the first IP address shows the true movements and identifies itself, then the next person is a bot and picks up the movements of the first IP address and appears they are now all one session. A third IP address shows up (different country, as well) and adds their movements to the same session, so I've lost the first and second person's information.

 

So, now I have this huge session that every time someone comes, tacks on their movements on top and changes the IP address to their own and all the movements are combined, leaving me with confusing and inaccurate results.

 

I'm so thrilled with contribution, but the raw logs are so much more accurate. Is there a fix?

 

Have I installed this correctly? Any suggestions? Things to try?

Share this post


Link to post
Share on other sites

I am having trouble with this part

 

== start ===========================

Add to admin/includes/footer.php (at the bottom):

 

<?php

require('../../catalog/' . DIR_WS_FUNCTIONS . 'user_tracking.php');

if ( ADMIN_CONFIG_USER_TRACKING == 'true') { tep_update_user_tracking(); }

?>

 

NOTE: replace /catalog/ with your named directory

my setup was:

./store/ (rootfiles etc...)

./store/admin/ (rootfiles etc...)

 

I dont mean o sound stupid and the contribution works great but I cant see where there coming from.

ANy help would be greatly appreciated


Randy Redner

Share this post


Link to post
Share on other sites

if you have kept "catalog" as folder you do not have to do something. In the other case, like the person who used "store" you must change the path on the "require" line to find the file user_tracking.php.

 

I was also wondering myself what this explanation ment but it was just an example.

 

Didier.

Share this post


Link to post
Share on other sites

Since I have this contribution installed for 1 week, I made some corrections and tweaks to this fabulous mod that is very useful.

 

- the idle time and total login time are wrong. Change in file admin/user_tracking.php where you display the idle and total time the number 28800 by 82800. This corresponds to 23h x 3600 sec. You should have now correct figures.

- I do not display sessions with a clickcount=1. I my case too many people just read the mainpage and go away. I do not count them as "interesting" visitors.

- I sorted the sessions by "ascending" instead of "desc". I find it easier to have the paths listed in a chronological way instead of reading them the bottom-up style.

- I have also moved the "Who's Online" menu to the User Tracking infobox as they are all used to see what's going on with you site.

- I still have to add the user tracking code to all pages that do NOT include the footer.php like the popup_image.php so that also these pages are tracked.

 

Voil?, I won't have time to do a contribution update for this but do not hesitate to contact me if you want more detailed information.

 

Didier.

Share this post


Link to post
Share on other sites

I do, I do!!!

 

I want any and all modifications to this contribution. I still haven't figured out how to get the referrer URL to show.

 

How can I get your changes?

Share this post


Link to post
Share on other sites

Spaceboy , i hope u ll have time to go deeper in details or update the contrib ... :D


MS2

Share this post


Link to post
Share on other sites

I still can't get the originating URL to show properly. I tried the Sept fix, but that didn't work (unless I did something incorrectly).

 

Any suggestions?

Share this post


Link to post
Share on other sites

First of all, many thanks to all who have worked on this important contribution.

 

I have read every post in this thread and have not found the answer to the following problems.

 

Here are the details a particular visit that I initiated myself:

 

Session ID User Shopping Cart Guest, aa569342a0fee8d7c8e9df6f807cac94, [delete session], [view session]

 

Click Count: 10

Start Time: 07:57:01 Idle Time: 00:12:56

End Time: 08:01:04 Total Time: 00:04:03

Country:

IP Address:

Host:

Warning: Address is not a valid IPv4 or IPv6 address in /var/www/html/admin/user_tracking.php on line 242

Originating URL: http://jewelsbymala.com/

08:01:04: 18k gold earrings of pearls new jade beads

08:00:46: 18 k gold earrings with sapphires and 22 k gold beads

07:59:07: Diamond chandelier earrings

07:59:02: Jewelry

07:58:31: Contact Us

07:58:20: Gifts

07:57:24: Education

07:57:16: Gifts

07:57:09: Jewelry

07:57:01: Pearls

 

Here's the corresponding row from the sessions table:

 

+----------------------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| sesskey | expiry | value |

+----------------------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| aa569342a0fee8d7c8e9df6f807cac94 | 1072196704 | referer_url|s:24:"http://jewelsbymala.com/";SESSION_IP_ADDRESS|s:12:"67.74.42.172";cart|O:12:"shoppingcart":5:{s:8:"contents";a:0:{}s:5:"total";i:0;s:6:"weight";i:0;s:6:"cartID";N;s:12:"content_type";b:0;}language|s:7:"english";languages_id|s:1:"1";currency|s:3:"USD";navigation|O:17:"navigationhistory":2:{s:4:"path";a:3:{i:0;a:4:{s:4:"page";s:9:"index.php";s:4:"mode";s:6:"NONSSL";s:3:"get";a:2:{s:5:"cPath";s:2:"26";s:6:"osCsid";s:32:"aa569342a0fee8d7c8e9df6f807cac94";}s:4:"post";a:0:{}}i:1;a:4:{s:4:"page";s:16:"product_info.php";s:4:"mode";s:6:"NONSSL";s:3:"get";a:2:{s:11:"products_id";s:3:"170";s:6:"osCsid";s:32:"aa569342a0fee8d7c8e9df6f807cac94";}s:4:"post";a:0:{}}i:2;a:4:{s:4:"page";s:16:"product_info.php";s:4:"mode";s:6:"NONSSL";s:3:"get";a:3:{s:11:"products_id";s:3:"113";s:5:"cPath";s:5:"26_29";s:6:"osCsid";s:32:"aa569342a0fee8d7c8e9df6f807cac94";}s:4:"post";a:0:{}}}s:8:"snapshot";a:0:{}} |

 

 

And here are the problems:

 

1.) The IP address column in the user_tracking table is blank in every row. However, I can see the IP address in the corresponding value column in the session table.

2.) Since the IP address is missing, so is the Host and Country.

3.) The third column of the session details is missing.

 

Any help on these issues would be greatly appreciated.

 

Thanks,


Jerome Freedman, Ph. D.

Share this post


Link to post
Share on other sites

What a great contribution!

 

Does anyone know how I can add more than one IP address to the exclude function?

 

I want to block my Internal LAN IP as well as my extrenal IP

Share this post


Link to post
Share on other sites

If your shop has too many visits from spanish users, it seems like most came from a little group of IP's. It's because Telef?nica de Espa?a, the bigger (and expensive :angry: ) ISP in Spain has been imposed to all their ADSL suscribers a Proxy-Cach?.

 

To fix this, you can edit you whos_online.php:

 

Look for:

 

$wo_ip_address = getenv( 'REMOTE_ADDR' );

 

 

Change with:

 

if ($_SERVER) { 
if ( isset($_SERVER[HTTP_X_FORWARDED_FOR] )) { 
$wo_ip_address = $_SERVER['HTTP_X_FORWARDED_FOR']; 
} 
elseif ( isset($_SERVER['HTTP_CLIENT_IP'] )) { 
$wo_ip_address = $_SERVER['HTTP_CLIENT_IP']; 
} 
else { 
$wo_ip_address = $_SERVER['REMOTE_ADDR']; 
} 
} 
else { 
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { 
$wo_ip_address = getenv( 'HTTP_X_FORWARDED_FOR' ); 
} 
elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { 
$wo_ip_address = getenv( 'HTTP_CLIENT_IP' ); 
} 
else { 
$wo_ip_address = getenv( 'REMOTE_ADDR' ); 
} 
}

 

That's all. If you want to track admin activity, you can do the same with admin/includes/functions/user_tracking.php

 

 

Ah!, one question about session listing:

 

When a session expires, the Originating URL dissapears in the user list. Is it possible to show it when the session expires too?

Share this post


Link to post
Share on other sites

Is anyone using this with the Use Search-Engine Safe URLs turned on? I have it on and this causes a problem with the statements if ($HTTP_GET_VARS['products_id']) and elseif ($HTTP_GET_VARS['cPath']. Since these if's don't ever return a true, in the user tracking history I get a lot of HEADING_TITLE labels rather than the name of the page or product.

 

Does anyone have a fix for this?

 

Thanks!

Share this post


Link to post
Share on other sites

Hi, I am using the user tracking module. I have 500 page views a day. I configured the session limit to be 500. but what happened is I only have a few record that session is not expired. For about 20 records later, all the sessions are expired.

 

to be exact, my latest record is 02:07, but my first record with session not expired is only 01:39. All the records before that are "session expired". this preven my from knowing which customer has put something into his cart and its original url.

 

How can I adjust my session time?

 

Thanks

Share this post


Link to post
Share on other sites

As spaceboy stated, I think there's a bug regarding the Total Time and Idle Time.

 

I may be wrong, but why add 28800 or 82800? In my way of reading these values it should add nothing, and give the correct time in seconds from start session to end session, plus the time so far. Or am I wrong, does anyone else have another idea? I've fixed my user_tracking.php code by removing either + 28800 or + 82800.

 

Also, a BUG alert, does anyone noticed that when going back to previous date you can no longer view the sessions for any visitor? When I attempt to do this, two things happen: first I noticed that the Select View line is not correct, showing me just the option to backtrack while the option to move forward in time is now on the beginning of the page; second and more importantly, after I click on View Session the page changes back to the current day tracking session, not allowing me to view, as an example, the sessions from yesterday. Is this a bug, and if so, as anyone fixed it?

 

I've fixed the formatting, taking the most recent contribution v1.35, with the changes made by Matthias and Joe Schlaf, plus fixing the idle/total time and the forward to date bugs.

 

I'm not releasing it as a contribution yet, due to these factors:

  • I don't use user_tracking_config.php, I prefer to have a different configuration group ID and control the settings from the Configuration area of the administration panel.
  • I use portuguese as my default (and only) language, although the administration area is still all in english. I don't update french, german or spanish, since I don't know these languages.
  • I prefer to wait until the View Session from previous dates bug is fixed.

If someone wishes to get a full contribution out of these changes, I can provide a ZIP or tar.gz file, with the changes I've done on top of everyone's else code. If anyone is working on a new release, please allow me to contribute with the portuguese translation files.

 

Many thanks to all, specially Andrew Edmond, Greg Williams, Robert Hellemans, Matthias Fahrig, Joe Schlaf.


Contributions:

. Browse by Categories

-----------------------------------------------------------

Jos? Carlos Monteiro - DoWeDo-IT

Share this post


Link to post
Share on other sites

I would love for the times to work properly so, yes, I'd love those fixes. All you did was remove those numbers and then it worked? I might just try that. I'd love for it to be on the same time zone that I'm on and have correct idle times.

 

I just checked my older dates and my green "view session" works and I know that I've not really touched anything, except for the attempt to fix the dates. So maybe we should compare code to isolate the problem?

Share this post


Link to post
Share on other sites

airolg,

 

Yes, all I did regarding the total and idle times was preventing the hardcoded value (either 28800 or 82800) to be added. Works like a charm.

 

About timezones, I have my site hosted on the United States, while in fact I live in Portugal. What I did to set the proper timezone is off-topic in here, but if no one else minds here's my fix:

Add this to the first line of code in application_top.php

putenv("TZ=Portugal");

 

That sets the correct TimeZone, I've seen this tip somewhere in Forum Tips & Tricks, can't recall which post. You may also want to adjust the date and time formats in english.php (or in my case portugues.php). Bare in mind, though, that you may not be allowed by system administrators to change the operating system environment variable TZ, but in that case you must contact them to help you out.

 

About the view session, well, I've had this problem since the first version of User Tracking that I installed, but I've not been able to isolate the cause of the problem yet. Where should I look at? What could be preventing me from viewing past date sessions?

 

Thanks.


Contributions:

. Browse by Categories

-----------------------------------------------------------

Jos? Carlos Monteiro - DoWeDo-IT

Share this post


Link to post
Share on other sites

When I removed those numbers, I was no longer able to see all the old "view sessions." I wonder if that is what is causing it to lose the sessions?

 

I put the number back, but it didn't restore my past sessions.

Share this post


Link to post
Share on other sites

airolg,

 

I had the problem even before editing the user_tracking.php. I've been trying to fix it, without success so far.

 

What happens in my case is that after I backtrack, let's assume to yesterday, and then I click on any view session the result is that osCommerce shows me the User Tracking page for today, as if I just entered the User Tracking report. Strange, can't figure out what it is.

 

Now, just because you have removed the addition of 28800 or 82800, you can't view past sessions? That's even stranger, because I assume one thing has nothing to do with the other. For what I trace back, there's only those 2 lines in user_tracking.php, one to calculate the idle time and the other to calculate the total time. Those lines don't set any variable, so I can't understand how one thing can be tied to another.

 

I'll keep on working on this.

Thanks.


Contributions:

. Browse by Categories

-----------------------------------------------------------

Jos? Carlos Monteiro - DoWeDo-IT

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×