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
// callback to trigger code upon a landing page form submit - the main call to action. | |
window.instapageFormSubmitSuccess = function( form ){ | |
// Instapage is a bit quirky with how it captures values of the form submit, but you should be able to use this code and replace the form fields with whatever your page is capturing. | |
var firstName = ijQuery( form ).find( 'input[name="' + window.base64.base64_encode( 'First Name' ) +'"]').val(); | |
var lastName = ijQuery( form ).find( 'input[name="' + window.base64.base64_encode( 'Last Name' ) +'"]').val(); | |
var email = ijQuery( form ).find( 'input[name="' + window.base64.base64_encode( 'Email') +'"]').val(); | |
// Segment identify call. | |
analytics.identify(email, { | |
firstName: firstName, |