Open wpdarren opened 1 month ago
I have the same issue. SItekit shouldn't have the option to automatically do this. They all should be disabled and should be optional under connected services.
I was able to disable this with this custom code in function :
add_action( 'wp_enqueue_scripts', 'disable_sitekit_ninja_forms_js' ); function disable_sitekit_ninja_forms_js() { // Check if Ninja Forms is active and the integration is enabled in Site Kit. if ( function_exists( 'ninja_forms_get_form_by_id' ) && ! empty( Google\Site_Kit\Core\Util\Feature_Flags::enabled( 'keyMetrics' ) ) ) { wp_dequeue_script( 'googlesitekit-events-provider-ninja-forms' ); } }
add_action( 'wp_loaded', 'disable_sitekit_ninja_forms_integration' ); function disable_sitekit_ninja_forms_integration() { remove_filter( 'googlesitekit_analytics_events_providers', array( 'Google\Site_Kit\Modules\Analytics\Events\NinjaForms', 'register_event_provider' ) ); }
Bug Description
I noticed a script error within Query Monitor. It is appearing on a site that has Ninja Forms activated and enhanced conversion tracking enabled. This appears when I go on the front end.
Missing Dependencies. nf-front-end-deps (missing)
I did test this and the conversation was getting tracked when the form is completed.
I am unsure if this issue also occurs for other third-party plugins that we support, so we might want to spend time going through each plugin and confirming.
Steps to reproduce
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Test Coverage
QA Brief
Changelog entry