Fixed a bug with defaultTab, and added tracking code.