Support » Plugin: Nelio AB Testing » 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?

    • This topic was modified 3 years, 1 month ago by SoLoGHoST.
    • This topic was modified 3 years, 1 month ago by SoLoGHoST.
    • This topic was modified 3 years, 1 month ago by SoLoGHoST.
    • This topic was modified 3 years, 1 month ago by SoLoGHoST.
    • This topic was modified 3 years, 1 month ago by SoLoGHoST.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi!

    Well, you could try this:

    1. Create a page test and change whatever you want in there. If the relevant part of the test is the specific post type your using, just use different shortcodes in your tested page and its variations.

    2. It’s currently not possible to track a conversion in PHP… but there are a few workarounds that might help you. For instance, after successfully submitting your form, redirect the user to a thank you page and set that page as your conversion. You might also want to use the iframe approach described here.

    Regards,
    David

    Thread Starter SoLoGHoST

    (@sologhost)

    Is it not possible for you to provide an action or filter to hook into the tracking here? This would be preferable. We were thinking of purchasing the Premium version of this plugin as we love the charts and all, but if the premium version does not offer this, than it would be pointless for us to use it.

    Can you please provide a hook for tracking stuff manually via php? Either with do_action or apply_filters?

    Thanks

    Plugin Author David Aguilera

    (@davilera)

    As I said, the current version doesn’t offer this. We’re working on a completely new version of the plugin right now and, even though it’ll be a little while until it’s ready, it’ll be easier to achieve what you want. Please stay tuned for the upcoming release of Nelio A/B Testing 5.0.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Type “phl_form” need to track submissions’ is closed to new replies.