Frequently Asked Questions

Adding Real-Time JavaScript to Your Site

Print this Article
Comment on this Article
Last Updated: January 24, 2012 11:03 AM

Enabling Site Analytics real-time stats alone is not enough to collect data from your entire site. You must also add the real-time JavaScript to each page you want to track. So, if you want real-time statistics for your entire site, you must include the real-time JavaScript on every page of your website.

Finding the Real-Time JavaScript

First, you need to locate the real-time JavaScript.

To Find the Real-Time JavaScript

  1. Log in to your Account Manager.
  2. Click Site Analytics.
  3. Next to the account you want to use, click Launch.
  4. Click the domain name you want to use.
  5. Click Settings, and then click Real-Time Reporting.
  6. Follow the instructions on the page to copy the real-time script.

Adding Real-Time JavaScript to Your Site

When real-time stats are enabled, you must include a code on the bottom of each page you want to track. The codes are identical JavaScripts you can use for each tracked page. Use Site Analytics to generate your real-time codes.

To Add Real-Time JavaScript to Your Site

  1. Open a text editing program, such as Notepad.
  2. Log in to the Web hosting account provided to you by your hosting provider.
  3. In the text editor, open the .html file of the Web page you want to add the real-time script to.
  4. In the <body> portion of the file, insert the script before the </body> tag at the bottom of your HTML page.
  5. Save the file.
  6. Upload the Web page to the server.

Testing the Real-Time JavaScript on Your Site

You can test your website to determine which pages have the JavaScript added and which pages do not. Performing this scan takes several seconds to several minutes to complete, depending on the number of pages in your site.

To Test the Real-Time JavaScript on Your Site

  1. Log in to your Account Manager.
  2. Click Site Analytics.
  3. Next to the account you want to use, click Launch.
  4. Next to the account you want to test, click Configuration.
  5. Click Verify Script.
  6. The Page Name links to the page on your site. Click the link to view the source code manually.