Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track form submissions #233

Merged
merged 12 commits into from
Jan 23, 2025
Merged

Track form submissions #233

merged 12 commits into from
Jan 23, 2025

Conversation

Dan0sz
Copy link
Collaborator

@Dan0sz Dan0sz commented Jan 22, 2025

This PR adds an option, called Form completions, to the Enhanced Measurements section:

image

Once enabled, a Custom Event goal is created, called Form Completions, with a custom property, called form.

JS is enqueued in the frontend to track form submissions, which uses the checkValidity() function to verify the form before tracking the submission. This is tested with WP Forms, Elementor Pro Forms and Ninja Forms and should work for most forms plugins.

Contact Form 7 uses a custom validation method, so a custom compatibility fix is added for that, too.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@Dan0sz Dan0sz merged commit 83dd4c8 into develop Jan 23, 2025
4 checks passed
@Dan0sz Dan0sz deleted the track_form_submissions branch January 23, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant