Tracking PeopleSoft usage with Google Analytics
Posted by: Brent Martin in PeopleSoft on Dec 10, 2009

I’ve been using Google Analytics to track how users use my web site for years now, but it just occurred to me that Google Analytics would be a powerful way to track usage in a PeopleSoft system as well.
Turns out it’s not all that hard to put the Google Analytics code on your Peoplesoft component pages. Here’s how to do it:
1) Launch App Designer
2) Pull up HTML Object PT_HNAV_TEMPLATE
3) Scroll to the bottom, and just after the closing tag but before the closing Body tag, add the Google Analytics code.

![]()
4) Save.
That’s all there is to it. Let this run for a day or two, and pretty soon you’ll see URL’s like this in your “Content Overview” section of Google Analytics:

Here are a few points to bear in mind:
- This is an “all or nothing” approach. Turning on Google Analytics in this way will turn it on for all of your Components. If you’re looking for a way to turn on Google Analytics for just eRecruit, you should probably consider customizing the page with an embedded HTML object.
- This only works for Components. There are other HTML objects you can target if you want to install the tracking code on the home page or individual portlets.
- Make sure your organization is OK with you using the Google Analytics service before turning it on. I wouldn’t think that aggregated URL and Visitor information would be considered sensitive data, but your company’s management might have a different opinion.
- I’ve been running this for all of 12 hours, so there may be some “gotchas” left to discover. Be sure to test in your own environment before rolling it to Production.
- PT_HNAV_TEMPLATE is a PeopleTools object, so PeopleTools upgrades and patches could overlay it without warning. Track it like you do any other customized PeopleTools object.
I can already think of some enhancements I’d like to make. I’d like to use more sophisticated Visitor segmentation so I can see who is doing what at a page level. I’d also like to set it up so that it separates traffic for my Dev/Test/Prod environments. But that’s for another day.

written by Randy McCausland, December 13, 2009

Mike