diff --git a/code-snippets/event-snippets/track-form-submits.js b/code-snippets/event-snippets/track-form-submits.js new file mode 100644 index 00000000..fd795b5a --- /dev/null +++ b/code-snippets/event-snippets/track-form-submits.js @@ -0,0 +1,3 @@ +document.addEventListener( 'submit', function(evt) { + koko_analytics.trackEvent('Form submit', 'Page: ' + location.pathname + '; Form: ' + evt.target.id); +});