Skip to content

Commit

Permalink
add generic snippet for tracking form submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Jan 5, 2025
1 parent 83d61ff commit 4a047cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code-snippets/event-snippets/track-form-submits.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
document.addEventListener( 'submit', function(evt) {
koko_analytics.trackEvent('Form submit', 'Page: ' + location.pathname + '; Form: ' + evt.target.id);
});

0 comments on commit 4a047cb

Please sign in to comment.