| | 1 | 1. 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. |
| | 2 | |
| | 3 | 2. Always back-up your files before you do any work. |
| | 4 | |
| | 5 | 3. 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. |
| | 6 | |
| | 7 | ********************************** |
| | 8 | |
| | 9 | Okay, let's get started in getting Google Analytics to work on your site. |
| | 10 | |
| | 11 | 1. 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. |
| | 12 | |
| | 13 | 2. Open /templates/base/_footer.html |
| | 14 | |
| | 15 | 3. Find the following code (It's on line 1 if your file is unmodified) |
| | 16 | {{{ |
| | 17 | </body> |
| | 18 | </html> |
| | 19 | }}} |
| | 20 | |
| | 21 | Above this code paste the "Google Analytics" Code you obtained from Google. |
| | 22 | |
| | 23 | 4. Save your file. |
| | 24 | |
| | 25 | 5. Go check your site, you'll see all is well. |
| | 26 | |
| | 27 | ******************************************************************************* |
| | 28 | |
| | 29 | Your _footer.html file will look like this when your done: |
| | 30 | |
| | 31 | {{{ |
| | 32 | <script type="text/javascript"> |
| | 33 | var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); |
| | 34 | document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); |
| | 35 | </script> |
| | 36 | <script type="text/javascript"> |
| | 37 | try { |
| | 38 | var pageTracker = _gat._getTracker("UA-1234567-8"); |
| | 39 | pageTracker._trackPageview(); |
| | 40 | } catch(err) {}</script> |
| | 41 | </body> |
| | 42 | </html> |
| | 43 | }}} |
| | 44 | |
| | 45 | Your done and can close the file now. Congratulations and track your sites statistics in detail at Google. |