
How can I track non-WordPress pages on my website?
Thanks to the Javascript-based external link tracking method, Google Analyticator easily allows tracking on non-WordPress managed pages, should you have them. The following guide will work for the latest version of Google Analyticator, 6.0 and above. The principal is similar for older versions.
Step 1: Include the required JavascriptFor link tracking to work, two Javascript files need to be included. If you don't care about link tracking (downloads, external links), then you can skip this step.
The first Javascript file is jQuery. You may already have jQuery included on your website. If not, open up your homepage, view the source, and look for a script tag that looks like this:
Copy that code (with your domain replaced instead of ronaldheft.com) and place it somewhere above the </head> tag on your non-WordPress page. Next, look for the actual tracking Javascript. It will look similar to this:
Again, replace the domain, and insert this script tag directly below the jQuery script you just added.
Step 2: Add the tracking code.After configuring Google Analyticator to how you like it, view the source on your homepage, and look the tracking code section, which looks like this:
Copy that code (not the above code, but the one from your website), and insert it as the last line of code before </head>. This is important as Google's async tracking method won't work is placed with other Javascript after it. Finally, verify that your tracking code does not contain the following line before _gaq.push(['_trackPageview']);
If that line exists, delete it.
Step 3: Enjoy!Your non-WordPress pages should be tracking fine after following those steps. Enjoy!