-
-
Save jessehanley/9a0e61159a05b18bb5625f840093c7d4 to your computer and use it in GitHub Desktop.
Thrive Leads
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
<script> | |
function track_bento_event() { | |
if (typeof(bento$) != 'undefined') { | |
bento$(function() { | |
// go over each input field and if it has email track it | |
bento$('input[type=email]').each(function() { | |
var email = bento$(this).val(); | |
if (email) { | |
bento.identify(email) | |
bento.track("$subscribe") | |
console.log(email) | |
console.log('stored') | |
} | |
}); | |
}); | |
} | |
} | |
$('.thrv_lead_generation_container form').submit(track_bento_event); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment