Skip to content

Instantly share code, notes, and snippets.

@grvoyt
Last active November 2, 2020 02:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save grvoyt/c975b547bc30751c042b3c581dfb9466 to your computer and use it in GitHub Desktop.
Save grvoyt/c975b547bc30751c042b3c581dfb9466 to your computer and use it in GitHub Desktop.
название цели ставится у формы тут http://prntscr.com/o3rsk9 . А в яндекс метрике событие jsvsscript
$(document).ready(function() {
window.myAfterSendedFunction = function($form){
//id yandex метрики
var metrikID = 99999999;
var goal = $form.find('[name=tildaspec-formname]').val();
var res = window['yaCounter'+metrikID].reachGoal(goal);
console.log(yaCounter51697628, res)
return true;
}
$('form').each(function(){
$(this).data('formsended-callback', 'window.myAfterSendedFunction');
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment