Track when form is submitted

Hello,

I build a simple form. I’m searching Google and this forum, but can’t find an example or good tutorial how customizing the tracking code and how setup the 'Goals on the Piwik Dashboard?

I try it with this code:

<form class="assist-form" action="/" method="POST">
<input type="text" name="age"value="1" />
<input type="submit" name="submit" value="Send" onclick="piwikTracker.trackGoal(1);"/>
</form>

But there is nothing happen in the Piwik Dashboard.

(PS: the website tracking works perfect)

Who can explain how can setup this?

Regards,
Christophe

I found it!
Adding this to the tracking code does the trick:
_paq.push([‘trackGoal’, ‘1’]);

And in the Piwik dashboard, setting the goal:
‘Event’ => ‘is exact’ => ‘Pattern’ (see screenshot)

UPDATE: i was to fast!

This doens’t work.

Also Form Analytics is coming soon! Check the page to learn more and be notified when it will be launched. :rocket: