Support » Plugin: WP-Piwik » Request: Track Comments as Goal (Conversion-Tracking)

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author braekling


    The fastest way to do so is just to change your themes comments.php.

    But I’ll keep this in mind. At least the Piwik API allows to implement goal features to WP-Piwik. So why not use this?

    Where would you put it? As I pointed out, modern themes’ comment.php don’t provide an input tag anymore.
    See yourself. Instead of printing an input and form field, they only call comment_field().

    So there is no easy to do this as you suggested. That’s why I asked for a hookor so.

    Thanks, Ben

    Plugin Author braekling


    Just a quick & dirty solution (core changes): See method 2, “Other WordPress Themes”.

    Maybe it will help to add a WordPress hack which calls comment_form, changes the submit button (e.g. str_replace) and prints the result.

    Or you can use jQuery and trigger the function on submit.

    I have no experience using comment_form and its arguments… maybe it provides a simple solution. Anyone here who can help?

    Hi there,

    I found the plugin “custom headers and footers” handy from time to time. In conjunction with your jQuery-idea I was able to put the following code to my blog’s footer:

    <script lang="text/javascript">
    jQuery(document).ready(function($) {
    	$('form#commentform input#submit').click(function() {
    		_paq.push(['trackGoal', 3]);

    Change the goal# to your own goal id. That’s it. Seems to work properly.

    Can you implement that or sth similar in your plugin?

    Plugin Author braekling


    Thank you very much. I will add this in

    Great, thanks! Topic is resolved then.

    I really wonder that there is only so few feedback from other users. Probably it will gain more as soon as the feature is implemented.

    Plugin Author braekling


    Due to some major bugs I released before this functionality was added and tested. But will follow soon.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Request: Track Comments as Goal (Conversion-Tracking)’ is closed to new replies.