Sean Cull

SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template 

Sean Cull  11 February 2010 08:00:00

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

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

Step 2 - disable the design inheritance for the wiki using application properties

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

Step 3 - open the prtBanner Custom Control

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

Step 4 - add an Output Script control to the Custom Control

Activate the Custom Controls Panel

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

Position your curson in the top left corner of the prtBanner and click

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

Select the "Output Script" Custom control from the "Other" Custom Controls menu

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template
Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

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.

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template


Now paste your Google Analytics Script between the Script Block markers so that it looks like this

Image:SNTT : Adding Google Analytics to the OpenNTF Xpages Wiki template

Save the Custom Control



 2nd hand tips  Admin Tips  Dev Tips  Lotus  Show-n-Tell Thursday  Wiki Template  XPages 


1Köll  03.11.2010 3:26:02  Good going with this post

Very cool Post, fancy!

Just happen to be on such a project that is in dire need for Google Analytics. The fact that this involves Xpages, gave me no reason to look any further; life simple, I'll say...

Thanks! Great view up there by the way;-)

Köll





Please leave a comment


Subject:
   
Name:
E-mail:
 
Comment:  (No HTML - Links will be converted if prefixed http://)
 
Remember Me?