Deceased
- Join Date:
- Aug 2004
- Location:
- Saint Petersburg, Russia
- Posts:
- 1,782
- Plugin Contributions:
- 5
User tracking mod
Add session id to all '<a href="...
Views: 183,730
Deceased
Add session id to all '<a href="...
Zen Follower
Hello all, have a problem here. We're running ZC 1.3.8 on our stores. A little while ago, the user tracking on the CreekTreeUSA shop quit working, it shows only a clean white page. The other shops appear to work fine, and there's no other symptoms on CreekTree, just no user tracking.
I looked at the database with phpMyAdmin, and the CreekTree user_tracking table has message that there's "No Index Defined". That table for the other shops have indexes time_entry, session_id, and time_entry2 defined.
For the time being, I've set "User tracking visitors" to false in the configuration. Does anyone have idea what's happened, and what needs to be done? Would appreciate any advice.
Zen Follower
inovermyhead:
Hello all, have a problem here. We're running ZC 1.3.8 on our stores.
Sorry, all, that should have been 1.3.7, not 1.3.8, and I might mention that the user tracking has been up and running fine on the store for over 6 months, it's been a very handy tool.
Zen Follower
Good Morning, all ...
To bring you up to date on this, yesterday I started thinking about simply adding those 3 indexes to the CreekTree database to see what happens, so I enabled user tracking again ... and found that it was working again! The database still shows no index for the table but I can't find any discrepancy in how it operates.
:unsure: So I'm in a 'leave well enough alone situation' unless someone has any idea what could have caused the malfunction, and what could have happened to those 3 indexes. Would appreciate any thoughts, comments, observations, advise anyone can offer.
Thanks,
Totally Zenned
A few weeks ago my host upgraded to apache 2.x Php 5.x.x and Mysql 5.x.x. After this upgrade the User Tracker on both of my stores stopped functioning - The mod was still in place but it regestered zero activity. I was told to re-load the SQL and have done so but still nothing. I even re-loaded the add-on completely but no changes :huh:
I'm running 1.3.6 on both stores. Any ideas?
Thanks
Zen Follower
I had user tracking running for the past year on 1.3.6 & 1.3.7. Now I upgraded to 1.3.8 and it quit working. I uninstalled it, downloaded the latest version and re-installed it, still no joy. The interface shows up fine, it just doesn't track any visitors.
Totally Zenned
kbalona:
I had user tracking running for the past year on 1.3.6 & 1.3.7. Now I upgraded to 1.3.8 and it quit working. I uninstalled it, downloaded the latest version and re-installed it, still no joy. The interface shows up fine, it just doesn't track any visitors.
As I've posted, I'm having exactly the same problem on both of my stores, although I'm still running 1.3.6. Mine occured after my host upgraded to apache 2.x Php 5.x.x and Mysql 5.x.x. - Now it just doesn't track
Zen Follower
I got my installation going again. I had forgotten to add the tracking code to the end of tpl_footer.php
<?php if (ZEN_CONFIG_USER_TRACKING == 'true') { zen_update_user_tracking(); } ?>
New Zenner
For all those people who have problems with the time offsets in total time and and idle time, the problem is the code that generates the html there is poorly written.
It is towards the end of admin/user_tracking.php, search for "28800".
The person who wrote this code used 28800 seconds (8 hours) offset as that presumably suited their timezone. With a bit of experimenting you can figure out what value works for you (provided you site runs on servers in the same timezone only).
The real solution is to change this code to be timezone neutral (work in every timezone).
Something like:
date('H:i:s', mktime(...)) would work (instead of the current date() call) only that in the database we have seconds only, this needs to be converted to hours, minutes, seconds as mktime() takes three parameters (hours, minutes, seconds).
Zen Follower
Laszlo:
For all those people who have problems with the time offsets in total time and and idle time, the problem is the code that generates the html there is poorly written.
It is towards the end of admin/user_tracking.php, search for "28800".
The person who wrote this code used 28800 seconds (8 hours) offset as that presumably suited their timezone. With a bit of experimenting you can figure out what value works for you (provided you site runs on servers in the same timezone only).
The real solution is to change this code to be timezone neutral (work in every timezone).
Something like:
date('H:i:s', mktime(...)) would work (instead of the current date() call) only that in the database we have seconds only, this needs to be converted to hours, minutes, seconds as mktime() takes three parameters (hours, minutes, seconds).
nice you found the problem, I've been annoyed for some time about that.
could you please write down more detailed on what to change that string to?
I'm not following your solution exactly.
thanks
Dejan
New Zenner
dedj:
nice you found the problem, I've been annoyed for some time about that.
could you please write down more detailed on what to change that string to?
I'm not following your solution exactly.
thanks
Dejan
For figuring out the time that suits your timezone just remove 28800 and check what is displayed then. Keep in mind 28800 seconds is 8 hours, figuring out the right time instead (in seconds) should be easy.
My server is hosted in New York, converting 0 with date gave me 19:00:00 and adding 8 hours gave me a 3 hours offset. So I added 5 hours only and it worked fine.
I don't remember having this problem before, I upgraded the mod to the latest version before Christmas at the same time when my provider moved to PHP 5.x (from 4.x) so I am not sure which one causes the problem.
I don't have a general solution, all I know date('H:i:s', mktime(0, 0, 0)) gives me 00:00:00. A general solution needs more work.
There are a other timezone issues as well, I always would have liked an option to set the user timezone as well so that the Start and End times can be in the timezone of the person who runs the mod in the Admin interface.
New Zenner
Does anybody know who is maintaining this mod currently?
New Zenner
Hi All,
Anybody has trouble filtering the bots out wth the latest version (1.3.6.2) from the Zencart downloads area?
I see the Google bot being at 400+ hits, yesterday I had the same with the Yahoo crawler.
I changed the tpl_footer.php code to:
<?php if (ZEN_CONFIG_USER_TRACKING == 'true' && !$spider_flag) { zen_update_user_tracking(); } ?>(note the spider_flag addition, it used to be like this with previous versions, seems to be removed from 1.3.6.2).
It does not seem to work, however it worked with previous versions of this mod.
Any ideas?
Thanks
Zen Follower
Laszlo:
Hi All,
Anybody has trouble filtering the bots out wth the latest version (1.3.6.2) from the Zencart downloads area?
I see the Google bot being at 400+ hits, yesterday I had the same with the Yahoo crawler.
I changed the tpl_footer.php code to:
<?php if (ZEN_CONFIG_USER_TRACKING == 'true' && !$spider_flag) { zen_update_user_tracking(); } ?>(note the spider_flag addition, it used to be like this with previous versions, seems to be removed from 1.3.6.2).
It does not seem to work, however it worked with previous versions of this mod.
Any ideas?
Thanks
Cant really help you Laszlo but I am using (1.3.6.2) and don't see any of the bots. Something I done from this forum.
Zen Follower
Laszlo:
Hi All,
Anybody has trouble filtering the bots out wth the latest version (1.3.6.2) from the Zencart downloads area?
I see the Google bot being at 400+ hits, yesterday I had the same with the Yahoo crawler.
I changed the tpl_footer.php code to:
<?php if (ZEN_CONFIG_USER_TRACKING == 'true' && !$spider_flag) { zen_update_user_tracking(); } ?>(note the spider_flag addition, it used to be like this with previous versions, seems to be removed from 1.3.6.2).
It does not seem to work, however it worked with previous versions of this mod.
Any ideas?
Thanks
I am having this same problem. If anyone knows a fix, please pm me.
Thanks
Totally Zenned
Laszlo:
For all those people who have problems with the time offsets in total time and and idle time, the problem is the code that generates the html there is poorly written.
It is towards the end of admin/user_tracking.php, search for "28800".
The person who wrote this code used 28800 seconds (8 hours) offset as that presumably suited their timezone. With a bit of experimenting you can figure out what value works for you (provided you site runs on servers in the same timezone only).
The real solution is to change this code to be timezone neutral (work in every timezone).
I recently had to install this mod for someone so I had a look at this bug. It is caused because the code is using the date() function to format something that is not a timestamp. To fix the code fully edit admin/user_tracking.php and then change the line (at about line 324) that says...
<td class="dataTableContent" colspan="2" valign="top"><?php echo date('H:i:s', (time() - $ut['value']['end_time']+ 28800)); ?></td>
```..to..
```php
<td class="dataTableContent" colspan="2" valign="top"><?php $dt=time() - $ut['value']['end_time']; printf("%02d:%02d:%02d",$dt/3600, ($dt % 3600)/60, $dt % 60); ?></td>
```...and the line (at about line 330) that says...
```php
<td class="dataTableContent" colspan="2" valign="top"><?php echo date('H:i:s', ($ut['value']['end_time'] - $ut['value']['time_entry'] + 28800)); ?></td>
```...to...
```php
<td class="dataTableContent" colspan="2" valign="top"><?php $dt=$ut['value']['end_time'] - $ut['value']['time_entry']; printf("%02d:%02d:%02d",$dt/3600, ($dt % 3600)/60, $dt % 60);?></td>
```Hope that helps.
Regards,
Christian.
New Zenner
Does anyone know how to stop it from tracking bots?
Previous versions had an option in one of the config files.
Deceased
Tropheus:
Does anyone know how to stop it from tracking bots?
Previous versions had an option in one of the config files.
Yes.
<?php if (ZEN_CONFIG_USER_TRACKING == 'true' && !$spider_flag) { zen_update_user_tracking(); } ?>
But you should know that the $spider_flag determined only if SESSION_FORCE_COOKIE_USE = 'False' and SESSION_BLOCK_SPIDERS == 'True'. Otherwise, you should setup himself this variable. The code for this you can get from init_sessions.php.
New Zenner
Thank you.
I cannot get my head quite round it though. My init_sessions.php file has not been changed so:
SESSION_FORCE_COOKIE_USE = 'True' and
SESSION_BLOCK_SPIDERS == 'True'
Should I change:
SESSION_FORCE_COOKIE_USE = 'False'
Or if I add to -- footer.php?
<?php if (ZEN_CONFIG_USER_TRACKING == 'true' && !$spider_flag) { zen_update_user_tracking(); } ?>There would be no need to modify the init_sessions.php file or would I need to do both files?
New Zenner
My admin/user_tracking_config.php is blanc after installing User Tracking v.1.3.6.2.
I've done everything as it says in the ReadMe.txt.
Am i missing something?
Fields marked required must be completed.
Tell staff why this post should be reviewed.