automattic / jetpack-heartbeat
This adds a cronjob that sends a batch of internal automattic stats to wp.com once a day
Installs: 536 553
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Type:jetpack-library
Requires
Requires (Dev)
- dev-trunk / 1.5.x-dev
- v1.5.0
- v1.4.1
- v1.4.0
- v1.3.15
- v1.3.14
- v1.3.13
- v1.3.12
- v1.3.11
- v1.3.10
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- 1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.0
- dev-fix/slack-workflow-branch-detection
- dev-fix/release-branch-typo
- dev-update/generate-branch-plugin
- dev-release-v1.3.3
- dev-release-v1.3.2
- dev-release-v1.3.1
- dev-feature/reorg
- dev-release-v1.3.0
- dev-release-v1.2.2
- dev-release-v1.2.1
- dev-release-v1.2.0
- dev-release-v1.1.0
- dev-release-v1.0.0
This package is auto-updated.
Last update: 2022-07-29 21:02:15 UTC
README
Sends a daily batch of stats to WP.com using the A8C MC Stats package.
These are internal usage stats for Automattic, not visible to site owners.
Usage
1. Make sure Heartbeat is initialized:
Automattic\Jetpack\Heartbeat::init();
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.