28 May 2008

Omniture Web Analytics and Blogger

I moved recently. Both my blog and my person. One of the side effects of moving to a new home was that my little Pentium II webserver in my basement had to retire. I no longer have my own IP address. So I had to find a new place to host my blog. Blogger or Blogspot worked out well for me because I could keep my own domain name.

One thing I have struggled with, switching from my own install of webpress to blogger, is trying to get Omniture's javascript code to work with my blog. I tried fruitlessly to get the code mixed into a template. I could never get it to render correctly. Maybe someone with more Blogger template experience could get it to work, but I could not. But I finally figured out an easy way to go about it. You can add a HTML/JavaScript page element to the layout of the blog.

Blogger has lots of different types of page elements you can add, such as polls, slideshows, or a blog archive. They also have a page element labeled HTML/JavaScript. This page element allows you to add any third-party JavaScript functionality to your blog. I can't believe it took me this long to find it.

Now knowing where I could place JavaScript code it was pretty easy to deploy. The one catch was that I had to make a small change to the Omniture code. The Omniture code comes in two parts. There is the base code and the configuration code. Generally the configuration code includes the base code. I hade no where to save a javascript file for the configuration code to include. Therefore I removed the link to include the code and just pasted the code above the configuration code. This required that I add <script type='text/javascript'></script> tags around the code, but other than that it was a fairly painless process.

Yes, this means that I am now collecting statistics about you as you read this. It is fun to see where people are coming from and what pages they look at. It looks like Google collects stats about everyone using blogger already too. Thanks for visiting. Come back soon.

4 comments:

Deanna said...

Haha big brother is watching... :P

Utah Boating said...

Thank you for your help, you completely saved me! Although I'm hosting my own s_code I did use the footer idea.

Please check out how I did it and let me know what you think. :)

Marvelous!!

Todays Give Away said...

Thanks for the great suggestions!
I got it working. I am hosting the JS file and it works great!

http://www.todaysgiveaway.blogspot.com

merlie said...
This comment has been removed by a blog administrator.