submitted by * mydatery (Trusted)
- Always use Notepad++ to edit your files. Do not use text or automatic as it may insert/delete characters on the individual files when you upload them in your FTP Client, Binary is the only way to guarantee this does not happen.
- Always back-up your files before you do any work.
- Always save your work, check the results and then close the file. As long as the file is open you can return it to it's original state if there's a problem, once you close your back to locating the changes and manually changing them or replacing files with your back up copies.
Okay, let's get started in getting Google Analytics to work on your site.
- Go to google, open an account and get approved, once approved go to Google again and get a "Google Analytics" Account (it's free) and copy the code they give you, you'll need it for this mod.
- Open /templates/base/_footer.html
- Find the following code (It's on line 1 if your file is unmodified)
</body> </html>
Above this code paste the "Google Analytics" Code you obtained from Google.
- Save your file.
- Go check your site, you'll see all is well.
*
Your _footer.html file will look like this when your done:
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-1234567-8"); pageTracker._trackPageview(); } catch(err) {}</script> </body> </html>
Your done and can close the file now. Congratulations and track your sites statistics in detail at Google.
Last modified 16 years ago
Last modified on Mar 9, 2009, 3:27:28 PM