I have been working on a public facing OpenNtf Xpages Wiki for our Delivery Toolkit suite of products and I wanted to add Google Analytics.
It turned out to be straight forward once I had read a blog by Thomas Adrian who’s Xpages based blog really looks the business – try out the search functionality.
Step 1 – copy the Analytics code from Google
Step 2 – disable the design inheritance for the wiki using application properties
Step 3 – open the prtBanner Custom Control
Step 4 – add an Output Script control to the Custom Control
Activate the Custom Controls Panel
Position your curson in the top left corner of the prtBanner and click
Select the “Output Script” Custom control from the “Other” Custom Controls menu
Switch to “Source” and you will see the Output Script represented by<xp:scriptBlock id=“scriptBlock1”></xp:scriptBlock>.
You can move this to the top of the other custom controls as shown below.
Now paste your Google Analytics Script between the Script Block markers so that it looks like this
Save the Custom Control