This script will help to automate a P2 post with weekly metrics for a given week.
Pull down this repo locally and set it up with composer.
- PHP
- Composer
# setup steps...
git clone <this repo>
cd metric-poster
composer install
NOTE: Zapier hook is currently disabled, outputs html in terminal to paste to Gutenberg editor.
# php
php ./script.php --id 123 --week 12 --metrics 404s,errors,warnings
# composer
## Gets all metrics (NR) with Title heading for P2.
composer nr-metrics
## Top errors (NR), no heading.
composer nr-errors -- --title false
## Swap out suffix as needed.
composer nr-404s
New Relic Metrics
- 404s
- 500s
- errors
- warnings
- cwv