'a@b.com', 'first_name' => 'Ana' ), 'My form' ); * * @param array $data Contact fields (see Nodebook_Fields::contact()). Unknown keys are stored as custom fields. * @param string $source Where the contact came from. * @return int Contact ID, or 0 when the data had no email or phone. */ function nodebook_capture( array $data, $source = '' ) { return Nodebook_Capture::capture( $data, $source ); } /** * Public helper: record a custom event for a contact ("webinar_attended", "trial_started"). * * Example: nodebook_track( 'ana@example.com', 'webinar_attended', array( 'value' => 'Villa investing 101' ) ); * * @param int|string|array $who Contact ID, email address or contact data. * @param string $name Event name. * @param array $args value, label, url, data, at, once, create, source (see Nodebook_Events::track()). * @return int Timeline entry ID, or 0. */ function nodebook_track( $who, $name, array $args = array() ) { return Nodebook_Events::track( $who, $name, $args ); }