Skip to content

Instantly share code, notes, and snippets.

@jessehanley
Last active November 18, 2021 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessehanley/9a0e61159a05b18bb5625f840093c7d4 to your computer and use it in GitHub Desktop.
Save jessehanley/9a0e61159a05b18bb5625f840093c7d4 to your computer and use it in GitHub Desktop.
Thrive Leads
<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