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

    (@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?

    Thread Starter B M

    (@mampf)

    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

    (@braekling)

    Just a quick & dirty solution (core changes):
    http://kikolani.com/how-to-set-up-blog-comments-goals-google-analytics-wordpress-hacks.html 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?

    Thread Starter B M

    (@mampf)

    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]);
    	});
    });
    </script>

    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

    (@braekling)

    Thank you very much. I will add this in 0.9.9.6.

    Thread Starter B M

    (@mampf)

    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

    (@braekling)

    Due to some major bugs I released 0.9.9.6 before this functionality was added and tested. But 0.9.9.7 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.