Last active
July 1, 2022 12:11
-
-
Save Cheffheid/32a6fb84f602936514c8 to your computer and use it in GitHub Desktop.
Simple Universal Analytics event trigger for Gravity Forms (AJAX)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Can be added on any page with a gravity form, it will hook into GF's own event that triggers when the confirmation is loaded (confirmed conversion). | |
(function($) { | |
$(document).bind("gform_confirmation_loaded", function(e, form_id) { | |
// Send event with category 'Form', action 'Submit', label 'Contact Us', and value 100. | |
ga('send', 'event', 'Form', 'Submit', 'Contact Us', 100); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment