This package is abandoned and no longer maintained. The author suggests using the automattic/jetpack-connection package instead.

This adds a cronjob that sends a batch of internal automattic stats to once a day

Installs: 656 646

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 1



Sends a daily batch of stats to using the A8C MC Stats package.

These are internal usage stats for Automattic, not visible to site owners.


1. Make sure Heartbeat is initialized:


2. Add your stats to the heartbeat

Add a filter callback:

add_filter( 'jetpack_heartbeat_stats_array', 'my_callback' );

In your callback, add the stats you want to the array with new key => value pairs where:

  • key is the stat group name
  • value is the stat name.
function my_callback( $stats ) {
	$stats['my-plugin'] = 'active';
	return $stats;

This will bump the stats for the 'my-plugin/active' stat.

And that's all!

Now your stats will be added to the batch of stats that are bumped once a day.

Using this package in your WordPress plugin

If you plan on using this package in your WordPress plugin, we would recommend that you use Jetpack Autoloader as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well.


Need to report a security vulnerability? Go to or directly to our security bug bounty site


jetpack-heartbeat is licensed under GNU General Public License v2 (or later)