Last time, I reviewed the basics of the powerful Clickstream Cloud feature of Adobe WEM (formerly CQ5), which is the feature whereby, if you type Ctrl-Alt-C, you get a popup summary of various bits of contextual information about the user, the user's browser, and the page the user is currently visiting (see illustration further below).
As with almost everything else in WEM, the Clickstream Cloud can be customized relatively easily, because the code for the Cloud is easily accessible (and modifiable) in the repository.
If you go in the repository under /libs/cq/personalization/clientlib/source/shared (best done in CRXDE Lite: just aim your browser at http://localhost:4502/crx/de/index.jsp#/crx.default/jcr%3aroot/libs/cq/personalization/clientlib/source/shared), you'll see a half dozen *.js files that govern the Clickstream Cloud's basic behavior, and if you look under /libs/cq/personalization/clientlib/source/clickstreamcloud, you'll find the *.js files that contain code for the various session stores that manage the information fields displayed in the cloud dialog. There's also a js.txt file at /libs/cq/personalization/clientlib/js.txt that governs how all these *.js files are loaded.
As a very simple example of customization of the Clickstream Cloud, let us suppose that you wanted to add a timestamp to the cloud dialog under "Surfer information" as shown below:

Notice the part, under Surfer Information, where it says "Thu Sep 08 2011 17:09:45," etc. This information was added as a result of custom code.
There are a couple of ways to do this. One way would be to alter the setSurferInfoInitialData() function in config.json.jsp (which is located in a somewhat obscure place, namely /libs/cq/personalization/components/clickstreamcloud/command/config/). You might be very tempted to do this since that's the function where the user's IP address, for example (which appears under Surfer Information), is set. But making a change in this function would actually be a bad thing to do, for a number of reasons. First, you're dealing with a core WEM file. And you're making hard-coded changes to it. There's no guarantee that this file will stay unmodified (or even continue to exist) in future versions of WEM, and by putting custom code in it, you've created a maintenance nightmare.
A better alternative is to create your own separate file, perhaps called custom.js, and place it under /libs/cq/personalization/clientlib/source/clickstreamcloud/. The content of custom.js is simply:
CQ_Analytics.CCM.addListener("configloaded", function() {
CQ_Analytics.SurferInfoMgr.setProperty( "timestamp", new Date() );
}, CQ_Analytics.SurferInfoMgr);
To ensure that custom.js loads at runtime, you do need to make a change to the aforementioned js.txt file (namely, the one at /libs/cq/personalization/clientlib/js.txt). Just add the line "clickstreamcloud/custom.js" to the end of the file.
Now you should be able to go to a new page (or reload the current page) in WEM, type Crtl-Alt-C, and see the timestamp information in the Surfer Information portion of the Clickstream Cloud dialog.
What's neat is that if you now click the Edit link in the upper right portion of the Cloud dialog, then click the Surfer Information tab of the dialog that pops up, you'll see timestamp info among the editable fields of the dialog:

For more information on the Clickstream Cloud API (including how you can create your own custom session store), see the documentation here.

Does this still hold true also for clientlibs?
I've accomplished the above by extending the data written to config.json, but this was all Server-side Java code, rather than client-side JS.
What are your thoughts on accessing JCR data via the CQ's JS APIs (they do not seem to be well documented).
Could you please suggest on this text?
All Segment resolving is happening in client side java script code. and finally resolved content are being displayed in teaser container.
For me, the client is some external portal not teaser component in CQ5. so in this case the resolving mechanism has to be written in server side CQ5 script and all resolved teaser news content will be exposed as JSON on http.
Does CQ5 provides something similar any thoughts on this.
Do i need to rewrite the server side code of teaser-client.js and segmentationMgr.js etc?
Newbies have one super slim pomegranate of being untrained. Thus, each time you begin perfect slim you body will instantly add muscle, no make any body slimming the bodybuilding regimen. This is due to the fact it is a new stimulus to your muscular tissues, so your system panics by pondering what is happening to it, then adds muscle to compensate.
2 Day Diet; Human Growth Hormone
<p>Depending on the action the metabolism is in, will actuate what restrictions are placed <strong><a href="http://www.menova,org/">menova st nirvana</a></strong>
on the aberration of foods. The after-effects are amazing already the dieter has been on the plan for a while. People on this affairs accept been acknowledged in accident huge<strong><a href="http://www.st-nirvana-herbal-slimming.com/">st nirvana slimming capsule</a></strong>
amounts of weight, even if they are not alive out. Regardless of the diet plan, a getting should consistently exercise.This plan is a acceptable way to accomplish a affairs change. A huge allotment of this affairs is getting able to cover eggs, meats and harder cheese with every meal. Eating carrots and bill is not a meal, for anyone that is acclimated to accepting meats with every meal. This diet will be accomplished for this array of person. Raw vegetables are not a capital advance the way it is with some competitors.<strong><a href="http://www.st-nirvana-herbal-slimming.com/">st nirvana slimming herbs capsule</a></strong>
And there are no preset times to eat a meal. Food aggregate will not be acclimated either. The alone affair in this plan that is like added diets is the actuality that, you will charge to alcohol affluence of water.</p>
<a href="http://www.shoxskos.com/adidas-sko-c-1.html">adidas sko barn</a>
<a href="http://www.shoxskovip.com/adidas-sko-c-1.html">adidas sko special</a>
Copyright © 2012 Adobe Systems Inc. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy
Adobe Day Software is now part of Adobe Read the release » Acquisition FAQ »
TRUSTe — EU Safe Harbor