I noticed that Firefox error console shows an error "Error: illegal character
Source File: http://www.google-analytics.
I figured out that by changing the file encoding from utf-16 to utf-8 the problem disappears. The reason is that Google Analytics code snippet is not working if the page is accidentally saved with utf-16 -encoding. Here is an example of "wrong" encoding:
Just save the file with utf-8 instead of utf-16 and the code will work. If you are not using Firefox, you can check the encoding with the Validator (while writing this post, the validator shows the encoding is "utf-16le" and the analytics code is not working on Firefox).
Ei kommentteja:
Lähetä kommentti