Enabling plugin on specific pages and subpages

You can get parent page slug and check like

global $post;
$post_data = get_post($post->post_parent);
$parent_slug = $post_data->post_name;
//echo $parent_slug;
if ( !is_page('events') || $parent_slug != 'events') {

Please try and let me know if any query