WordPress Integration
Request Metrics integrations easily with WordPress to monitor real user performance, capture important events, and understand your user experience. You can automate the installation with our WordPress Plugin, or integrate it manually.
Request Metrics integrations easily with WordPress to monitor real user performance, capture important events, and understand your user experience. You can automate the installation with our WordPress Plugin, or integrate it manually.
WordPress Plugin
The Request Metrics WordPress Plugin extends the WordPress admin UI with a “Request Metrics” section that allows you to configure your website token and quickly link out to your Performance Dashboard.
Once configured, the plugin will place the Request Metrics install snippet on all of your pages, along with a Custom URL Group that matches the page template or post type. Your Request Metrics reports will be grouped to match the templates you expect in WordPress
The plugin is aware of WooCommerce and will send page grouping information based on stores, collections, products, and checkout.
Installing the Plugin
- Download the ZIP file of our latest release from our GitHub Repository.
- Extract the
request-metrics
directory to your computer - Upload the
request-metrics
directory to the/wp-content/plugins/
directory - Activate the plugin in the Plugin dashboard
- Visit Request Metrics > Settings in your Admin and add your website token.
The Request Metrics WordPress Plugin is open source and available on GitHub.
Manual Integration
You can install Request Metrics on your WordPress site without using our plugin by adding the JavaScript snippet directly. This can be done by modifying your theme’s functions.php
file, or by installing a generic plugin like WPCode.
Installing Request Metrics in Your Theme
- Open your WordPress Admin and go to “Tools” > “Theme File Editor”.
- From the right-side list of files, select “Theme Functions (functions.php)”
- Add the following code to that file:
Save the file and Request Metrics will be added your theme for all pages.
Installing Request Metrics with WPCode (Insert Headers and Footers)
Many WordPress sites use WPCode (formerly “Insert Headers and Footers”) to manage custom code snippets. To install Request Metrics with WPCode, follow these steps:
- Open your WordPress Admin and go to “Code Snippets” > “Add Snippet”
- Select “Add Your Custom Code”
- Add the title “Request Metrics” and paste the following code into an “HTML Snippet”
Save and activate the snippet.