Titan CMS online support, find help and get answers

How to Integrate Google Analytics

  • Published: October 29, 2008
  • |
  • Updated: May 10, 2011
  • |
  • Version: 2

Google offers a powerful free tool to help you learn more about how your visitors interact with your website. This article explains how to enable your website to use the tracking and analysis provided through Google Analytics.


Monitoring and analyzing traffic information is critical to the success of your website. By learning about where your visitors come from and how they interact with your website, you’ll be better equipped to make changes to your content that result in increased traffic and conversion. Google Analytics offers insights into your website traffic through hundreds of informative reports and charts.

Google Analytics is implemented in Titan CMS sites by inserting the analytics tracking code into the website’s pages. This “page tag” JavaScript broadcasts anonymous information to Google about a site visitors experience on your website, including whether the visitor is new or returning, duration of time spent on a page, and the referrer site the visit came from (e.g. search engine, direct, referring site, etc).

Google provides a great deal of information on the use of Google Analytics, and several resources are available on the Internet to learn more about how to successfully use Google Analytics reports to improve your website.


Configure Tracking Code

The Titan Administration module gives you the flexibility to specify code snippets that can be placed in the HEAD section of your pages. To enable the use of Google Analytics tracking on a specific page, you need to first add the script to that page by making a configuration change in Titan Administration.

  1. Login to your Titan Workstation as a webmaster or administrative user.
  2. Switch to the Titan Administration module.
  3. Go to the configuration screen for the Page Layouts in your specific Globe under the Content Sites node.
  4. Add the Google Analytics tracking script to the Post-Titan Metatags/Code Snippets textarea for each Page Layout used on your website. You may use either, but not both, the New or Legacy tracking codes provided through Google Analytics:

    Sample Google Analytics Tracking Code (ga.js)

    <script type="text/javascript">
      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    <script type="text/javascript">
      var pageTracker = _gat._getTracker("xx-xxxxxx-xx");

    Sample Legacy Tracking Code (urchin.js)

    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    <script type="text/javascript">
      uacct = "xx-xxxxxx-xx";

  5. Save the Page Layout changes and Refresh Site State

Google Analytics