Adding Real-Time JavaScript to Your Website
Enabling Website Analytics real-time stats alone is not enough to collect data from your entire Website. 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 Website, 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
- Log in to your Account Manager.
- Click Site Analytics.
- Next to the account you want to use, click Launch.
- Click the domain name you want to use.
- Click Settings, and then click Real-Time Reporting.
- Follow the instructions on the page to copy the real-time script.
Adding Real-Time JavaScript to Your Website
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 Website Analytics to generate your real-time codes.
To Add Real-Time JavaScript to Your Website
- Open a text editing program, such as Notepad.
- Log in to the Web hosting account provided to you by your hosting provider.
- In the text editor, open the
.html
file of the Web page you want to add the real-time script to. - In the
<body>
portion of the file, insert the script before the</body>
tag at the bottom of your HTML page. - Save the file.
- Upload the Web page to the server.
Testing the Real-Time JavaScript on Your Website
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 Website.
To Test the Real-Time JavaScript on Your Website
- Log in to your Account Manager.
- Click Site Analytics.
- Next to the account you want to use, click Launch.
- Next to the account you want to test, click Configuration.
- Click Verify Script.
- The Page Name links to the page on your Website. Click the link to view the source code manually.