Opened 5 weeks ago

Closed 5 weeks ago

Last modified 5 weeks ago

#7640 closed defect (bug) (fixed)

Notices due to Jetpack Stats direct inclusion

Reported by: dd32's profile dd32 Owned by: akirk's profile akirk
Milestone: Priority: low
Component: Translate Site & Plugins Keywords:


E_USER_NOTICE: Function Automattic\Jetpack\Stats\Tracking_Pixel::add_to_footer is <strong>deprecated</strong> since version 0.6.0 with no alternative available.

The above is being triggered on Translate due to Jetpack stats updating the way it's loaded.

See [12557], r20315-dotorg.


plugins/wporg-gp-customizations/inc/class-plugin.php:		add_action( 'gp_footer', array( 'Automattic\Jetpack\Stats\Tracking_Pixel', 'add_to_footer' ), 101 );
plugins/wporg-gp-playground/inc/routes/class-route.php:		\Automattic\Jetpack\Stats\Tracking_Pixel::add_to_footer();

Change History (3)

#1 @dd32
5 weeks ago

  • Owner set to akirk
  • Status changed from new to reviewing

@akirk could you take a look? I'm unsure how to test it properly.

#2 @akirk
5 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 13715:

wporg-gp-customizations: fix wp_enqueue_admin_bar_header_styles notice, remove Jetpack stats as they are loaded already in the global header

Fixes #7640

#3 @akirk
5 weeks ago

Thanks @dd32. It can be verified by searching the HTML source of the respective pages for jetpack-stats-js-after and clickTrackerInit:

  1. Any page on
  2. A Translate Live page such as

In both instances the code is loaded.

Note: See TracTickets for help on using tickets.