The portal theme provided with IBM® WebSphere® Portal Express® is prepared and suitable for use with Active Site Analytics. You can also create your own custom theme to use the Active Site Analytics functionality.
<span class="asa.portlet.id" style="display:none;"><%= myPortletID %></span>
<portal-skin:portletID var="myPortletID"/>
<jsp:useBean id="myPortletID" class="java.lang.String" scope="page"/>
<span class="asa.portlet.title"><portal-skin:portletTitle></portal-skin:portletTitle</span>
<portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.ActiveSiteAnalyticsAggregators">
<portal-theme-ext:themeExtensionLoop>
<portal-theme-ext:themeExtensionItemText />
</portal-theme-ext:themeExtensionLoop>
</portal-theme-ext:themeExtension>
This code loops over
every implementation of the theme extension point and executes it.
The default implementation included with the portal follows the approach
previously outlined. <portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.ActiveSiteAnalyticsDependencies">
<portal-theme-ext:themeExtensionLoop>
<portal-theme-ext:themeExtensionItemText />
</portal-theme-ext:themeExtensionLoop>
</portal-theme-ext:themeExtension>
This code loops over every implementation of the theme
extension point and executes it. The default implementation included
with the portal follows the approach previously outlined. Active Site Analytics can include a dedicated JSP fragment as part of the aggregator inclusion on the page. The portal appends the contents of the JSP fragment to the content that is injected into the theme.html of the theme.
You configure the JSP similarly to the aggregator itself: Add page metadata with the key of asa_jsp to the page. The portal interprets the value as a file name relative to the theme.html of the theme in WebDAV. For example, if you want to add markup from a JSP in a file named page.jsp , you can put this JSP next to theme.html using WebDAV and configure a new page property with the key asa_jsp and the value page.jsp .
Example: If the key of a piece of metadata is asa_jsp and its value is set to asa_sample.jsp, then the portal searches for a JSP with a file name asa_sample.jsp and, if it finds such a file, it includes it in the page contents.
<portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.ActiveSiteAnalyticsInclude">
<portal-theme-ext:themeExtensionLoop>
<portal-theme-ext:themeExtensionRenderInclude/>
</portal-theme-ext:themeExtensionLoop>
</portal-theme-ext:themeExtension>
This code loops over
each implementation of the theme extension point and executes it.
The default implementation included with the portal follows the approach
outlined earlier. <span class="asa.portlet.id" style="display:none;"><%= myPortletID %></span>
In this case the file asa_sample.js looks for elements
with the class asa.portlet.id to find the portlet
ID of all portlets present on the page. Portlet titles can be rendered
by using code similar to this: <portal-skin:portletTitle />
To capture such portlet
titles, you can add an additional span element with a class defined
for titles that the analytics JavaScript file will look for: <span class="asa.portlet.title"><portal-skin:portletTitle /></span>
In this case, asa.portlet.title is recognized as the class for all span
elements that encompass the rendered text of the portlet titles.