I’m a bit of a nut about clean HTML, is there a tidier way to implement Google analytics? I feel like if I move it to a .js file it won’t work.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can move it to an external js file and it will work just fine. In fact, maybe you want it to load after your dom completes loading. It’s up to you. If you want to make sure, install wireshark and watch the connection get made to analytics.google.com .
wireshark: http://www.wireshark.org/