I like the way they Design/Architecture it but how do I implement this

Posted by Rachel on Stack Overflow See other posts from Stack Overflow or by Rachel
Published on 2010-04-17T00:18:43Z Indexed on 2010/04/17 0:43 UTC
Read the original article Hit count: 342

Filed under:
|

Summary:

I have different components on homepage and each components shows some promotion to the user.

I have Cart as one Component and depending upon content of the cart promotion are show. I have to track user online activities and send that information to Omniture for Report Generation.

Now my components are loaded asynchronously basically are loaded when AjaxRequest is fired up and so there is not fix pattern or rather information on when components will appear on the webpages. Now in order to pass information to Omniture I need to call track function on $(document).(ready) and append information for each components(7 parameters are required by Omniture for each component).

So in the init:config function of each component am calling Omniture and passing paramters but now no. of Omniture calls is directly proportional to no. of Components on the webpage but this is not acceptable as each call to Omniture is very expensive.

Now I am looking for a way where in I can club the information about 7 parameters and than make one Call to Omniture wherein I pass those information.

Points to note is that I do not know when the components are loaded and so there is no pre-defined time or no. of components that would be loaded.

The thing is am calling track function when document is ready but components are loaded after call to Omniture has been made and so my question is

Q: How can I collect the information for all the components and than just make one call to Omniture to send those information ?

As mentioned, I do not know when the components are loaded as they are done on the Ajax Request.

Hope I am able to explain my challenge and would appreciate if some one can provide from Design/Architect Solutions for the Challenge.

© Stack Overflow or respective owner

Related posts about design

Related posts about architecture