Arnaud73 / ngx-matomo

Matomo (aka. Piwik) web analytics for Angular applications
MIT License
102 stars 48 forks source link

Possibility to add tracking for form analytics #3

Open mpisters opened 6 years ago

mpisters commented 6 years ago

Would it be possible to add a function to do form analytics with matomo. I have read the guide and I don't think it would be too hard to implement. https://developer.matomo.org/guides/spa-tracking

It should include this function: _paq.push(['FormAnalytics::scanForForms', documentOrElement]);

Arnaud73 commented 6 years ago

I'll look into it!

mpisters commented 6 years ago

I found out that for manually tracking one form that you should use:

_paq.push(['FormAnalytics::trackForm', documentOrElement]);

and to track a submit: _paq.push(['FormAnalytics::trackFormSubmit', document.getElementById('login')])

Found in doc: https://developer.matomo.org/guides/form-analytics/faq