Last active
August 11, 2017 07:58
-
-
Save avdoshenkov/c1e715ff8d5661844a1d548c00c0ae4f to your computer and use it in GitHub Desktop.
Yandex.Metrics aim on sent form via AjaxForm event in MODX
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
$(document).on('af_complete', function(event, response) { | |
var form = response.form; | |
// Если у формы определённый class | |
if (form.hasClass('ajax-form') && response.success) { | |
yaCounter00000000.reachGoal('form-sent'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment