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

User tracking mod

Views: 183,764

Results 601 to 620 of 861
26 Nov 2013, 2:05 PM
#601
blessisaacola avatar

blessisaacola

Totally Zenned

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

User tracking mod

Thanks for the updates. Just upgraded to 1.4.3b and I am getting the following error: > [26-Nov-2013 08:54:28 America/New_York] PHP Fatal error: Call to undefined function right() in /includes/functions/extra_functions/user_tracking.php on line 78 This means your change suggested above is not included in the downloaded mod. Here is the code from lines 78 and 79:php while (strpos(right($wo_last_page_url, 1), '\\') !== false) { $wo_last_page_url = substr($wo_last_page_url, 0, -1); } Once I applied your change I started getting another error:> [26-Nov-2013 09:01:45 America/New_York] PHP Fatal error: Call to undefined function right() in /includes/functions/extra_functions/user_tracking.php on line 84I believe this is because you erroneous use "right" in this section of the code:```php
/* Start - User tracking v1.4.3b modification*/
while (strpos(right($wo_last_page_url, 1), '\') !== false) {
$wo_last_page_url = substr($wo_last_page_url, 0, -1);
}
/* End - User tracking v1.4.3b modification*/

/* Start - User tracking v1.4.3b modification*/
while (strpos(right($referer_url, 1), '\\') !== false) {
    $referer_url = substr($referer_url, 0, -1);    
}
/* End - User tracking v1.4.3b modification*/
26 Nov 2013, 3:06 PM
#602
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

Thanks for the updates. Just upgraded to 1.4.3b and I am getting the following error: This means your change suggested above is not included in the downloaded mod. Here is the code from lines 78 and 79:php while (strpos(right($wo_last_page_url, 1), '\\') !== false) { $wo_last_page_url = substr($wo_last_page_url, 0, -1); } Once I applied your change I started getting another error:I believe this is because you erroneous use "right" in this section of the code:```php
/* Start - User tracking v1.4.3b modification*/
while (strpos(right($wo_last_page_url, 1), '\') !== false) {
$wo_last_page_url = substr($wo_last_page_url, 0, -1);
}
/* End - User tracking v1.4.3b modification*/

/* Start - User tracking v1.4.3b modification*/
while (strpos(right($referer_url, 1), '\\') !== false) {
    $referer_url = substr($referer_url, 0, -1);    
}
/* End - User tracking v1.4.3b modification*/

See last post on previous page. <http://www.zen-cart.com/showthread.php?35081-User-tracking-mod&p=1228003#post1228003>
I had uploaded a more recent rev b, but apparently the earlier version made it. Conceptually I had the right idea, but implemented the wrong version of coding for it to work in PHP and provided that change here in case things went amiss.  

In playing with the changes made I also found a problem in user_tracking_config.php where a variable $gID is used in place of $UserTrackgID. I'll make the change and upload a newer version as well.  Maybe I can do this upload one time right the first time. 

It was a little difficult to test a problem I personally was not experiencing, but found a way using information you had provided. So thank you for that.
26 Nov 2013, 3:49 PM
#603
blessisaacola avatar

blessisaacola

Totally Zenned

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

Re: User tracking mod

mc12345678:

See last post on previous page. http://www.zen-cart.com/showthread.php?35081-User-tracking-mod&p=1228003#post1228003
I had uploaded a more recent rev b, but apparently the earlier version made it. Conceptually I had the right idea, but implemented the wrong version of coding for it to work in PHP and provided that change here in case things went amiss.

In playing with the changes made I also found a problem in user_tracking_config.php where a variable $gID is used in place of $UserTrackgID. I'll make the change and upload a newer version as well. Maybe I can do this upload one time right the first time.

It was a little difficult to test a problem I personally was not experiencing, but found a way using information you had provided. So thank you for that.

The last set of the code you provided in the link is still problematic because of the two instances of this: strpos(right I will wait for your upload. I have disabled the mod on the Admin side and that seems to stop the madness. Before disabling it, I had 100+ error in the log in less than 2 minutes.

26 Nov 2013, 5:20 PM
#604
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

The last set of the code you provided in the link is still problematic because of the two instances of this: strpos(right I will wait for your upload. I have disabled the mod on the Admin side and that seems to stop the madness. Before disabling it, I had 100+ error in the log in less than 2 minutes.

Dag goneit, I hate making errors.

/* Start - User tracking v1.4.3b modification*/
    while (strpos([B]substr[/B]($wo_last_page_url, [B]-1[/B]), '\\') !== false) {
        $wo_last_page_url = substr($wo_last_page_url, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

    /* Start - User tracking v1.4.3b modification*/
    while (strpos([B]substr[/B]($referer_url, [B]-1[/B]), '\\') !== false) {
        $referer_url = substr($referer_url, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

Sheesh, guess I had a long weekend. Sorry to inflict so much confusion. Will repost the total corrected code shortly. I must have not copied over the change properly when posting and then fed the site the wrong update. Sorry Zenners.

27 Nov 2013, 2:14 PM
#605
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

For those that would just want the corrected code update, here are the basic changes (functional changes) (compared to version 1.4.3), I am leaving out the additional words portion of the update at this time.

In YOUR_ADMIN/user_tracking.php

find:

 $listed = 0;
  if ($results)
  while (($ut = each($user_tracking)) && !$user_tracking->EOF /*($listed++ < CONFIG_USER_TRACKING_SESSION_LIMIT)*/)

replace with (Change in red):

  $listed = 0;
  if ($results && is_array($user_tracking) == true)
  while (($ut = each($user_tracking)) && !$user_tracking->EOF /*($listed++ < CONFIG_USER_TRACKING_SESSION_LIMIT)*/)

Find:

  reset($user_tracking);
    //End of v1.4.3 14 of 15 
  if ($results)
  while (($ut = each($user_tracking)) && ($listed++ < CONFIG_USER_TRACKING_SESSION_LIMIT))

replace with (Change in red):

      //End of v1.4.3 14 of 15 
  
  if ($results && is_array($user_tracking) == true) {
    /* Begin v1.4.3b  (Moved statement to within test) */
        reset($user_tracking);
    /* End v1.4.3b */
while (($ut = each($user_tracking)) && ($listed++ < CONFIG_USER_TRACKING_SESSION_LIMIT))

and

Find:

// End User Tracking - Spider Mod 6 of 7
 }

Replace with (Change in red):

// End User Tracking - Spider Mod 6 of 7
 }}

in \includes\functions\extra_functions\user_tracking.php

at approximately line 70 (after $page_desc asssignment) but before $db->Execute add:

    /* Start - User tracking v1.4.3b modification*/
    while (strpos(substr($page_desc, -1), '\\') !== false) {
        $page_desc = substr($page_desc, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

then after $wo_last_page_url assignment and before $db->Execute:

    /* Start - User tracking v1.4.3b modification*/
    while (strpos(substr($wo_last_page_url, -1), '\\') !== false) {
        $wo_last_page_url = substr($wo_last_page_url, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

    /* Start - User tracking v1.4.3b modification*/
    while (strpos(substr($referer_url, -1), '\\') !== false) {
        $referer_url = substr($referer_url, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

These last two changes need to be before the $db->Execute command.
No indicators have been added. This all will simply clean up the data going to be processed via SQL so that 1) a warning won't be generated when no data is present for the data reviewed, and 2) will prevent SQL injection of creating a ' situation unintentionally.
Tada done...

No, did not get to next set of features to be added, but I did see another forum where it was identified that a "Full" version was included. Might be able to keep with this single forum and upload both versions. Might need to have a discussion with the plug-in moderator(s) about how to identify that each upload should appear, but have slightly modified description to address handling the desired situation of not downloading EVERYTHING each time. (For those just catching up, there are files that are included that attempt to identify the location of a visitor; however, those portion of the files have not been updated in many years and are outdated. A change is needed to handle the newer version(s); however, I have another project on which I'm working at the moment that has a higher priority. For the curious, other tools are available to lookup the current location of an IP address. That said, maintaining a long historical list of IP addresses, may not be significantly beneficial as the IP address may be reallocated to another location in the world. Maintaining this type of list for a long period of time may require maintaining other information to associate with the date/time of that IP addresses visit.) Anyways, I digress.

Above is the corrected presentation of the code that was updated. I have submitted a rev 1.4.4 that provides the corrected code, which yes I had provided the wrong information both in a previous post and in the file(s) that were uploaded under version 1.4.3b. The issue identified in the user_tracking_config.php file was also corrected.

Good luck!!! Thanks for the helpful feedback!

27 Nov 2013, 7:08 PM
#606
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

gilby:

If you are updating the GeoIP.dat file, you have to also get the latest geoip.inc file to access it correctly.

I'm a little curious about the above statement, and of course welcome input. I decided to try to incorporate the latest GeoIP.dat file into my active site. I renamed the previous file (kept the extension, though haven't looked to see what the effect of that is), and added the new file. It appears to me (right or wrong) that the file is successfully being used to report accurate locations.

Now I haven't looked to see what happens in the display of information if an "error" comes up in the search/presentation of the information, but I was previously seeing host names that in no way matched the flag/country identified. Now that I have loaded the newer file, I have gone back to ping addresses that show up as international and they have the correct association of country to IP address... I've been toying with the idea of transitioning to GeoIP2; however, am having to interpret the guidance provided and see if the available IPN like information can be condensed down to a ZC specific implementation removing extraneous files and code.

Is this something that you have implemented/toyed with and could provide some insight into?

28 Nov 2013, 4:07 AM
#607
gilby avatar

gilby

Totally Zenned

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

Re: User tracking mod

mc12345678:

I'm a little curious about the above statement, and of course welcome input. I decided to try to incorporate the latest GeoIP.dat file into my active site. I renamed the previous file (kept the extension, though haven't looked to see what the effect of that is), and added the new file. It appears to me (right or wrong) that the file is successfully being used to report accurate locations.

Now I haven't looked to see what happens in the display of information if an "error" comes up in the search/presentation of the information, but I was previously seeing host names that in no way matched the flag/country identified. Now that I have loaded the newer file, I have gone back to ping addresses that show up as international and they have the correct association of country to IP address... I've been toying with the idea of transitioning to GeoIP2; however, am having to interpret the guidance provided and see if the available IPN like information can be condensed down to a ZC specific implementation removing extraneous files and code.

Is this something that you have implemented/toyed with and could provide some insight into?If you compare the older to the most recent version of geoip.inc you will see that they have switched a couple of names around (the older version was wrong) and have added approx 4 new countries.

Of more interest is they have edited the names of quite a few of the countries to their current proper names.

Also support has been added for ipv6

In practical terms, if you only deal with the major english speaking or european countries you probably won't see much difference in using either.

28 Nov 2013, 4:30 AM
#608
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

gilby:

If you compare the older to the most recent version of geoip.inc you will see that they have switched a couple of names around (the older version was wrong) and have added approx 4 new countries.

Of more interest is they have edited the names of quite a few of the countries to their current proper names.

Also support has been added for ipv6

In practical terms, if you only deal with the major english speaking or european countries you probably won't see much difference in using either.

Well, the only way I see that I can "look" at the older and newer geoip.inc, is to pay for the newer one. (At least as it looked to me.) I didn't see where it was possible to obtain a newer .inc (interpreter) file.

Now, yes the geoip2 data definitely needs a new inc file in order to properly capture/identify the data.

28 Nov 2013, 5:01 AM
#609
gilby avatar

gilby

Totally Zenned

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

Re: User tracking mod

Here's one here that I googled that's about 12 months old
geoip.inc

There is one from about May this year but I can't find it quickly

28 Nov 2013, 5:20 AM
#610
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

gilby:

Here's one here that I googled that's about 12 months old
geoip.inc

There is one from about May this year but I can't find it quickly

Well, imagine all that. I could have sworn that I looked for that last week... It's even simpler... It's on github... and only a month old.. :)

https://github.com/maxmind/geoip-api-php/tree/master/src

29 Nov 2013, 12:03 PM
#611
blessisaacola avatar

blessisaacola

Totally Zenned

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

Re: User tracking mod

Here is my latest error:> [28-Nov-2013 23:43:25 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 's%20Science%20Club%20Microscope%20and%20Journal', 'Educational Insights Nancy B' 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', 'fb6d3871016ffbebde95586b802f0414', '24.236.229.133', '1385700205', '1385700205', '/index.php?main_page=product_info&products_id=86402&gclid=CMaL_cSXibsCFclcMgod1EgApg', 'http://www.google.com/aclk?sa=l&ai=Cyn7UaBuYUtPBHIm2-QOijoGwAZ6CsMYD_sil-0HugcP8xQEIBhAHILlUKAhQ3K-m6P##########_AWDJ1qyJkKSIEKAB1Mar_QPIAQeqBCZP0Cblz5bDyrb-EQlFVMnZDBH2UaHp-4bpeMgbY-bt0Hxgh8aBL4AFkE7ABQWgBiaAB5S51AKQBwHgEqahzP2QlLS2Jw&sig=AOD64_1_SNzCkGTlRdatFOvqeL5RNJzEBw&ctype=5&ved=0CLsBELsX&adurl=http://www.clevershoppers.com/index.php%3Fmain_page%3Dproduct_info%26products_id%3D86402&rct=j&q=Nancy%20B's%20Science%20Club%20Microscope%20and%20Journal', 'Educational Insights Nancy B's Science Club Microscope and Act', 'OFFICE_IP_TO_HOST_ADDRESS') in /includes/classes/db/mysql/query_factory.php on line 120

29 Nov 2013, 5:15 PM
#612
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

Here is my latest error:

So, now trying to figure out a few things:1

  1. How is it that the refer_url is longer than 253 or 254 characters?
  2. The above is not supposed to occur in the user side of logging.
  3. Which logging is currently active?

The problem lies in that there is an apostrophe that is not escaped in the referer_url. This is throwing off the SQL (assuming all content was copied and pasted). I do not know if this is some sort of limitation of the addslashes function. The email received based on the above post included an exclamation point in that variable that is not visible in the above unedited post. So I am not sure what was fully fed to the addslashes and of that what came back and why it was not truncated prior to going to the SQL statement. Had it been truncated as expected by the above information, then no error would have occurred in this case.
I also forget, have you for the purposes of posting on this forum been changing the IP address and entering OFFICE_IP_TO_HOST_ADDRESS or is that a result of the previous SQL fail?

29 Nov 2013, 5:30 PM
#613
blessisaacola avatar

blessisaacola

Totally Zenned

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

Re: User tracking mod

mc12345678:

So, now trying to figure out a few things:1

  1. How is it that the refer_url is longer than 253 or 254 characters?
  2. The above is not supposed to occur in the user side of logging.
  3. Which logging is currently active?

The problem lies in that there is an apostrophe that is not escaped in the referer_url. This is throwing off the SQL (assuming all content was copied and pasted). I do not know if this is some sort of limitation of the addslashes function. The email received based on the above post included an exclamation point in that variable that is not visible in the above unedited post. So I am not sure what was fully fed to the addslashes and of that what came back and why it was not truncated prior to going to the SQL statement. Had it been truncated as expected by the above information, then no error would have occurred in this case.
I also forget, have you for the purposes of posting on this forum been changing the IP address and entering OFFICE_IP_TO_HOST_ADDRESS or is that a result of the previous SQL fail?

No I am not changing anything except for the server path to admin (which I removed for security reasons). I know the url is long but I have seen this with Google Adwords that some of the referral url is ridiculously long and it also depends on the user setting what Google does with the url when sending the customer to our site. Again, I don't have any issues in the error log if I disable user tracking. User tracking seems to be the only mod at the moment that's triggering this error. IP to Host conversion is set to false on our site.

29 Nov 2013, 5:38 PM
#614
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

No I am not changing anything except for the server path to admin (which I removed for security reasons). I know the url is long but I have seen this with Google Adwords that some of the referral url is ridiculously long and it also depends on the user setting what Google does with the url when sending the customer to our site. Again, I don't have any issues in the error log if I disable user tracking. User tracking seems to be the only mod at the moment that's triggering this error. IP to Host conversion is set to false on our site.

So what I mean by the referer_url being so long is that just before the SQL is run, that particular variable is truncated to 253 characters (or possibly 254, I haven't looked at how that assignment occurs); however, the value shown in the above error indicates that referer_url is about 460 characters long.

The only way that could happen if the program is installed as written/provided is if the logging of the admin side is active and somehow it is logging an admin's activity where they are not logged in... (Try to explain that one... :) ) That's why I question the length of the url and how it is so long.

29 Nov 2013, 6:42 PM
#615
blessisaacola avatar

blessisaacola

Totally Zenned

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

Re: User tracking mod

mc12345678:

So what I mean by the referer_url being so long is that just before the SQL is run, that particular variable is truncated to 253 characters (or possibly 254, I haven't looked at how that assignment occurs); however, the value shown in the above error indicates that referer_url is about 460 characters long.

The only way that could happen if the program is installed as written/provided is if the logging of the admin side is active and somehow it is logging an admin's activity where they are not logged in... (Try to explain that one... :) ) That's why I question the length of the url and how it is so long.

Hmm, I do not have the mod enable on the admin side. Not exactly sure how you came to the conclusion that this was triggered on the admin side.

29 Nov 2013, 6:50 PM
#616
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

Hmm, I do not have the mod enable on the admin side. Not exactly sure how you came to the conclusion that this was triggered on the admin side.

Review of the code shows that the admin version of the functions does not truncate the referer_uri (I would say because the admin side is considered something of a closed loop), so that led me to believe the information was provided through the admin. Of course that was also based on the belief that all files are of the version previously posted (with the corrections made because I messed up).

Basically, the insert is done in only two files, in one it is supposed to truncate the text, in the other it doesn't yours was not truncated, leading me to understand that the info came from the other or a file(s) are not up-to-date.

29 Nov 2013, 7:30 PM
#617
blessisaacola avatar

blessisaacola

Totally Zenned

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

Re: User tracking mod

mc12345678:

Review of the code shows that the admin version of the functions does not truncate the referer_uri (I would say because the admin side is considered something of a closed loop), so that led me to believe the information was provided through the admin. Of course that was also based on the belief that all files are of the version previously posted (with the corrections made because I messed up).

Basically, the insert is done in only two files, in one it is supposed to truncate the text, in the other it doesn't yours was not truncated, leading me to understand that the info came from the other or a file(s) are not up-to-date.
I will wait until your latest version is available in the download section and see if that resolve the issue. If not, I will uninstall and pick this up next year. I am lost as to why this would be an issue on the admin side. Like I said, the url is from a Google Adwords ads and it makes no sense that the landing page for a Google Adwords will trigger this on the admin side. Thanks!

29 Nov 2013, 8:43 PM
#618
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

I will wait until your latest version is available in the download section and see if that resolve the issue. If not, I will uninstall and pick this up next year. I am lost as to why this would be an issue on the admin side. Like I said, the url is from a Google Adwords ads and it makes no sense that the landing page for a Google Adwords will trigger this on the admin side. Thanks!

Well, the unfortunate thing is that because this plug-in counts on external influence in order to cause an action, unless someone else is able to identify similar issues and willing to continue testing/able to identify what is "going on" it will be difficult to resolve this. My site is not presenting these issues, and I suspect that others are waiting for you and I to "work this out". May need to insert something to help identify the path taken to document how this issue is arising.

There's no reason the truncation can't be added into the admin side, but the admin side shouldn't be activated for normal users. (If there is a problem in the code, obviously would like to resolve it.)

2 Dec 2013, 1:53 AM
#619
woodymon avatar

woodymon

Totally Zenned

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

Re: User tracking mod

BlessIsaacola:

Like I said, the url is from a Google Adwords ads and it makes no sense that the landing page for a Google Adwords will trigger this on the admin side. Thanks!

Indeed the Google Adwords referral URLs come from the catalog side. It could not be any other way. The Adwords referral URL strings I observe are always very lengthy. Not sure why MC believes otherwise.

I have to ask where in the "tracking" process does this mod "record" a "hit" (access request/attempt)?

Does every hit that appear in the user tracking database also appear in the server access log?

2 Dec 2013, 2:32 AM
#620
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: User tracking mod

Woodymon:

Indeed the Google Adwords referral URLs come from the catalog side. It could not be any other way. The Adwords referral URL strings I observe are always very lengthy. Not sure why MC believes otherwise.

I have to ask where in the "tracking" process does this mod "record" a "hit" (access request/attempt)?

Does every hit that appear in the user tracking database also appear in the server access log?

Please note, I did not indicate that the URI that is presented to UT is a surprise to be long. It is that UT is supposed to truncate that URI prior to storing it in the database. It is the storing routine (or lack of it successfully storing) that is causing blessisaacola the problem, because an apostrophe appears in the original uri that is not being escaped (assume because the original text length is greater than 254 characters and is only increased in the function that adds slashes (addslashes($stringtext)). That apostrophe is beyond the end of the 254 character limit imposed, and the string length being presented to the database was 400+ characters, when I thought it should be no more than 254.

Apparently I was wrong... The last_page_url is truncated, but the referrer url appears was not... Head bowed in shame It was when I went back to try to copy and paste the code in here, that I figured it out...

Towards the end of YOURSTORE/includes/functions/extra_functions/user_tracking.php

have the code look something like this:

    /* Start - User tracking v1.4.3b modification*/
    while (strpos(substr($page_desc, -1), '\\') !== false) {
        $page_desc = substr($page_desc, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

    $wo_last_page_url = substr($wo_last_page_url, 0, 253);
    /* Start - User tracking v1.4.3b modification*/
    while (strpos(substr($wo_last_page_url, -1), '\\') !== false) {
        $wo_last_page_url = substr($wo_last_page_url, 0, -1);    
    }

    $referer_url = substr($referer_url, 0, 253);

    while (strpos(substr($referer_url, -1), '\\') !== false) {
        $referer_url = substr($referer_url, 0, -1);    
    }
    /* End - User tracking v1.4.3b modification*/

In his case, I was trying to figure out why a string greater than 254 characters was being presented to the SQL when I thought there was a specific function present to prevent a string greater than 254 characters from being provided. (THERE WASN"T, BUT IT IS PROVIDED ABOVE)

In regards to the question of tracking process. It is after the footer has loaded, then the data is parsed, if it passes internal filters and checks of UT, then it is logged.

Regarding the comparison of UT database with the server access log: All successful loads of the footer that make it through the internal filters/checks and then are logged are expected to show up in the server access log, unless there has been some tom foolery that gave UT bad information (which in some cases is attempted).

A significant difference between the two is that the server access log will also more than likely also show every css file, image and a multitude of other objects that were requested (including the robots.txt file where one doesn't exist).

Thanks for asking more about it, made me think it through more thoroughly and because I was working on a number of other things on my site, I have all my tools open to use... I just didn't really have the sample data to test it and have been hoping to get some other feedback.