Why do all methods in the Google Analytics tracking code start with an underscore?,
Prefixing variable and method names with an underscore is a common convention for marking things as private. Why does all the methods on the page tracker class in the Google Analytics tracking code (
ga.js) start with an underscore, even the ones that are clearly public, like
Because Google can’t be bothered to follow the and therefore they don’t want accidental collisions in the global namespace?
That’s the answer Why do all methods in the Google Analytics tracking code start with an underscore?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.
The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you