Three Common Troubles With The New GATC
There are always a few problems when youâ€™re doing something brand new. Iâ€™d like to quickly outline a few of the issues we have found while working with the new GATC. Two of the three issues listed here are merely a result of a documentation error on Googleâ€™s support site. Iâ€™m sure it will be quickly resolved, but until then you should avoid pasting this code directly into your webpages.
The first problem is the use of directional quotes (smart quotes) in the code that Google asks you to copy onto your webpages. These are the quotes that face one direction at the beginning of a quote and the other direction at the end of a quote. It is an easy oversight to make, but web browsers are not so forgiving. Whenever you see this type of quotes, make sure you overwrite them with straight quotes in an application such as Notepad before using the code on your website.
Dynamic http/https handling
Dynamically handling either an http or https version is a great idea, I really liked seeing it in the new GATC. However, it has been suggested a few times that this code doesnâ€™t fully comply with XHTML standards, which can cause some problems. Replacing the dynamic code with a reference to just one version or the other should work just fine until things get sorted out. For Example:
During development, names of functions and variables can change and itâ€™s hard to be sure every change propagates to every document. The function _trackVisit() doesnâ€™t actually exist in the ga.js. So,instead of
and you’ll be fine.
The End (for now)
Iâ€™d like to note that all of these issues have already been addressed in the Google Analytics Help Group by several people, including ShoreTel whose patience in answering the same questions over and over deserves some recognition.