Custom Post Type “phl_form” need to track submissions
-
Need to test a custom post type that is not public, but is publicly queryable, and does not have archives. Example of it’s registration is here:
register_post_type('phl_form', array( 'description' => __('Forms'), 'label' => __('Forms'), 'labels' => array( 'name' => _x('Form', 'Post Type General Name'), 'singular_name' => _x('Form', 'Post Type Singular Name'), 'menu_name' => __('Forms'), 'parent_item_colon' => __('Parent Form'), 'all_items' => __('All Forms'), 'view_item' => __('View Form'), 'add_new_item' => __('Add Form'), 'add_new' => __('Add New'), 'edit_item' => __('Edit Form'), 'update_item' => __('Update Form'), 'search_items' => __('Search Forms'), 'not_found' => __('Not Found'), 'not_found_in_trash' => __('Not Found in Trash') ), 'supports' => array('title', 'editor'), 'rewrite' => false, 'hierarchical' => false, 'public' => false, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => false, 'show_in_admin_bar' => true, 'query_var' => true, 'menu_position' => 10, 'menu_icon' => 'dashicons-admin-page', 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => true, 'publicly_queryable' => true, 'capability_type' => 'page' ) );
These are pulled into the site via shortcode using WordPress function
add_shortcode
and needs the ID of the form on which to show for that page.Although, I need to track conversions on form submission. Not sure which is the best way to do this. Basically, I want to serve 2 pages, with 2 different options on them based on 1 page. But I need to track when a form is successfully submitted and on which Nelio Testing Page it was submitted on. Is there a way to do this in PHP? To send a conversion over manually? Some function/filter that is within the Nelio AB Testing plugin? The custom post type “phl_form” has a validation function in php, that I would like to send to AB Testing when the form was submitted successfully. But how to do this for a custom post type exactly that acts like a form? Which AB Experiment would be best for this?
- The topic ‘Custom Post Type “phl_form” need to track submissions’ is closed to new replies.