Hi All, I am quiet new to this forum and this is my first post ever. Guys i need to implement webtrends tracking for a web-site and need to use smartsource data collector, though i could find the smartsource code from the posts, but still do not know how to implement it. Do i need webtrends software for that or by placing smartsource code at the footer of all my pages would work. As i'm using it for the first time can anybody of you volunteer to make me understand how to implement this code, in a stepwise manner, Shall be grateful to you guys.
Thanx Niks On Jun 15, 6:53 pm, skyeflye <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a client that is runningWebTrendsfor a large, enterprise web > site. The wayWebTrendsworks is very simple, and similar to many > other user-trackingsoftware. There is a chunk ofWebTrendsJavaScript > code (they call it the "SmartSource Data Collector Script"), embedded > in the bottom of every page's source code. This script basically just > gathers several environment variables and then appends a new <img /> > tag to the DOM. The source (src) for the image tag is loaded from a > separate web server that is running theWebTrendssoftware. So, when > theWebTrendsserver receives the request for this tiny image, it logs > the visit to the page in itsWebTrendsdatabase. > > The "SmartSource" script (embedded at the bottom of every web page) > just defines a function and then immediately invokes it, like this: > > function dcs_main() { > // collect client info; > // create a new <img /> object;} > > dcs_main(); //immediately invoke the above function > > The problem I am having is that 99% of the time, IE6 is not finishing > the execution of theWebTrendscode, so the special <img /> tag is not > getting appended to the DOM. This is obviously bad because then the > visit to the page is not recorded byWebTrends. > > I also have a few simple jQuery DOM manipulations firing on $ > (document).ready(). Based on some testing, my theory is that in IE6, > theWebTrendsdcs_main() function is beginning its execution but it > never finishes because while it is running, my simple jQuery DOM > manipulations also begin, and the two scripts "collide" when they both > try to change the DOM at the same time. There are never any errors or > anything. I guess I am actually lucky that only IE6 is having this > problem since any browser might have a problem with DOM manipulation > collisions. > > One potential solution is to re-invoke theWebTrendsdcs_main() > function from inside the $(document).ready() event IF the special > image tag has not already been added to the DOM. That way, if the > dcs_main() function was "short-circuited" by the jQuery scripts (or if > it was somehow not invoked at all), it would definitely be re-invoked > from inside the $(document).ready() event. This "backup measure" could > help to ensure that the <img /> was appended to the DOM no matter what > and that the visit to the page was properly recorded byWebTrends. > > I am just wondering if anyone else could recommend a solution with a > different methodology that might not require this kind of "backup > measure" approach. For example, if there was any way to perhaps delay > my jQuery scripts in $(document).ready() from running until after > theWebTrends<img /> tag had been appended to the DOM (which will happen > nearly instantaneously anyway). > > Thanks!