Unfortunately not; it’s set up to be triggered whenever there’s a successful submission.
To limit it to just one form, modify the plugin like this:
function wpcf7_ga_tracking( $items, $result ) {
$form = WPCF7_ContactForm::get_current();
if ( 'mail_sent' === $result['status'] && 'insert_your_CF7_form_id_here' == $form->id() ) {
if ( ! isset( $items['onSentOk'] ) ) {
$items['onSentOk'] = array();
}
$items['onSentOk'][] = sprintf(
'if ( typeof ga !== "undefined" ) {
ga( "send", "event", "Contact Form", "Sent", "%1$s" );
}
if ( typeof _gaq !== "undefined" ) {
_gaq.push([ "_trackEvent", "Contact Form", "Sent", "%1$s" ]);
}
if ( typeof __gaTracker !== "undefined" ) {
__gaTracker( "send", "event", "Contact Form", "Sent", "%1$s" );
}',
esc_js( $form->title() )
);
}
return $items;
}
add_filter( 'wpcf7_ajax_json_echo', 'wpcf7_ga_tracking', 10, 2 );
or disable the plugin and add the above code to your functions.php file.