Skip to content

Instantly share code, notes, and snippets.

@RitwikGA
Created March 15, 2018 16:57
Show Gist options
  • Save RitwikGA/89e30505bab999d5b7bddcae56c91865 to your computer and use it in GitHub Desktop.
Save RitwikGA/89e30505bab999d5b7bddcae56c91865 to your computer and use it in GitHub Desktop.
Track Caldera Forms in Google Tag Manager
<script>
function formSubmit( obj ) {
if ( "complete" == obj.status ) {
dataLayer.push({'event': 'formSubmit', 'formName':obj.form_name+" ("+obj.form_id+")", 'submissionId': obj.data.cf_id })
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment