SMF (Simple Machine Forum) the simple yet discussion open source forum software. I have been using this software in one of my website from one year. I love SMF because of its simplicity and fast loading. Recently, I have added Google analytics in my SMF to track the visitors. The file structure ofÂ Â SMF is easy to understand and is easy to put the analytics code as well.
If you are using SMF and confused on how to add Google Analytics tracking then this post will help you overcome your confusion. First of all navigate to the your theme folder, there you will see a file “index.template.php,” it is the core file that controls the theme. Open this file with your favorite text editor, for example, Notepad++. Then find in this file andpaste your trackingcode just before like this,
Â echo ‘
The code above is for demonstration purpose only, you need to keep your own Google Analytics code. You can now confirm the code from page source and webmaster tool.
If you don’t want to mess up editing files then you can install SMF mod named Google Analytics code from here.