Comments are important to track on a blog. They are an important way to track if your readers are engaging with your website or blog. For Joomla, there are many components which offer comment systems for your Joomla websites. One of the most popular comment components is Jcomment by JoomlaTune. Here is how you can track comments in Google Analytics when you use the Jcomment component. To use this instruction, you will need to have Jcomments installed. You will also need access to the files of your Joomla website (preferably by FTP). We have focused our instruction on the latest version of Jcomments, v220.127.116.11. Instructions may vary on different versions of the component.
1. Finding the right file to edit in Jcomments
You will need to find the template of the form that posts comments. The file is called 'tpl_form.php'.
You can find the file in this folder of your Joomla website: 'components/jcomments/tpl/'.
2. Editing the file to track posted comments
In line 49 you will find this code:
You will have to replace this line of code with:
Once you have made this change, you can save it and upload the new version of the file.
3. Setting up a goal in Google Analytics
- Login to your Google Analytics account.
- Click edit next to the profile name you want to add your goal to
- Click on 'add new goal'
- Add a description to the goal and add this line to the goalurl field: /tracking/comment-submit
- Save the goal